ZSGG Public Library
Thrall
Legion T1 Army Unit
import { LegionArmyUnit } from "../../../../defaults/legion.js";
import { Attack, Upgrade } from "../../../../engine/ability.js";
export class Thrall extends LegionArmyUnit {
override uuid: string;
static override src = "src/zerospace/faction/legion/unit/thrall.ts";
constructor() {
super();
this.hexiteCost = 50;
this.fluxCost = 0;
this.buildTime = 27;
this.buildCount = 3;
this.name = "Thrall";
this.description = "Light ranged infantry.";
this.tier = "T1";
this.internalId = "Troop_Empire_Thrall_C";
this.internalPath = "/Game/Nova/Archetypes_Troops/Troop_Empire_Thrall.Default__Troop_Empire_Thrall_C";
this.internalTags = [
"Attackable.Unit.Troop",
"Attackable.Unit.Light",
"Attackable.ArmorType.Light",
"Attackable.Biological",
"Local.Legion.Infantry.Thrall.Ranged",
];
this.internalSecondaryTags = ["Infantry"];
this.uuid = "36ebdf54-30ef-4672-8cf2-69b099129c6d";
this.supply = 1;
this.hp = 75;
this.shields = 0;
this.armor = 0;
this.armorType = "light";
this.speed = 525;
this.turnSpeed = 5000;
this.hotkey = "Q";
this.createdBy = ["faction/legion/building/legion-barracks"];
this.unlockedBy = ["faction/legion/building/legion-barracks"];
this.upgradedBy = ["faction/legion/building/citadel"];
this.description = "Light ranged infantry. Attacks ground and air units.";
this.tag("legion:thrall");
this.attacks.galynxAssaultCannon = new Attack({
name: "Galynx Assault Cannon",
damage: 7,
cooldown: 1.5,
range: 800,
targets: ["air", "ground"],
armorPenetration: 0,
delay: 0.06,
parentId: this.id,
parentUUID: this.uuid,
});
const unit = this;
this.upgrades.battleFrenzy = new Upgrade({
name: "Battle Frenzy",
description: "+15 per attack to a maximum of 75%",
tier: "T1.5",
fluxCost: 100,
researchTime: 40,
apply() {},
parentId: this.id,
parentUUID: this.uuid,
});
this.upgrades.chargedShot = new Upgrade({
name: "Charged Shot",
description: "Every 15 seconds your next attack deals +100% damage",
tier: "T1.5",
fluxCost: 100,
researchTime: 40,
apply() {},
parentId: this.id,
parentUUID: this.uuid,
});
this.upgrades.performanceEnhancers = new Upgrade({
name: "Performance Enhancers",
description: "+15% attack & movement speed",
tier: "T2.5",
fluxCost: 150,
researchTime: 50,
apply() {
unit.speed = (unit.speed || 0) * 1.15;
unit.attacks.galynxAssaultCannon.cooldown = (unit.attacks.attack.cooldown || 0) * 0.85;
},
parentId: this.id,
parentUUID: this.uuid,
});
}
}
export default Thrall;