ZSGG Public Library
Steelsworn
Legion T1 Army Unit
import { LegionArmyUnit } from "../../../../defaults/legion.js";
import { Attack, Upgrade } from "../../../../engine/ability.js";
export class Steelsworn extends LegionArmyUnit {
override uuid: string;
static override src = "src/zerospace/faction/legion/unit/steelsworn.ts";
constructor() {
super();
this.hexiteCost = 50;
this.fluxCost = 0;
this.buildTime = 20;
this.buildCount = 1;
this.name = "Steelsworn";
this.description = "Tanky melee infantry.";
this.tier = "T1";
this.internalId = "Troop_Empire_Steelsworn_C";
this.internalPath = "/Game/Nova/Archetypes_Troops/Troop_Empire_Steelsworn.Default__Troop_Empire_Steelsworn_C";
this.internalTags = [
"Attackable.Unit.Troop",
"Attackable.Unit.Light",
"Attackable.ArmorType.Medium",
"Attackable.Biological",
"Local.Legion.Infantry.Thrall.Armored",
];
this.internalSecondaryTags = ["Infantry"];
this.uuid = "94c059bd-31df-459c-9fb7-cf20ac2bf2a9";
this.supply = 2;
this.hp = 200;
this.shields = 0;
this.armor = 1;
this.armorType = "medium";
this.speed = 550;
this.turnSpeed = 5000;
this.hotkey = "W";
this.createdBy = ["faction/legion/building/legion-barracks"];
this.unlockedBy = ["faction/legion/building/legion-barracks"];
this.upgradedBy = ["faction/legion/building/citadel"];
this.description = "Tanky melee infantry. Attacks ground units.";
this.tag("legion:thrall");
this.attacks.steelPincers = new Attack({
name: "Steel Pincers",
damage: 12,
cooldown: 1.37,
range: 100,
targets: ["ground"],
bonusDamage: [{ multiplier: 2.0, vs: ["armor:light"] }],
armorPenetration: 0,
delay: 0.15,
parentId: this.id,
parentUUID: this.uuid,
});
const unit = this;
this.upgrades.alloyArmor = new Upgrade({
name: "Alloy Armor",
description: "Each hit increases attack speed (+10% up to 70%)",
tier: "T1.5",
fluxCost: 100,
researchTime: 40,
apply() {},
parentId: this.id,
parentUUID: this.uuid,
});
this.upgrades.saw = new Upgrade({
name: "Saw",
description: "Additional +100% damage against light armor",
tier: "T1.5",
fluxCost: 100,
researchTime: 40,
apply() {
unit.attacks.steelPincers.bonusDamage = [{ multiplier: 3.0, vs: ["armor:light"] }];
},
parentId: this.id,
parentUUID: this.uuid,
});
this.upgrades.performanceEnhancers = new Upgrade({
name: "Performance Enhancers",
description: "+40% movement speed",
tier: "T2.5",
fluxCost: 150,
researchTime: 50,
apply() {
unit.speed = (unit.speed || 0) * 1.4;
},
parentId: this.id,
parentUUID: this.uuid,
});
}
}
export default Steelsworn;