@zerospacegg/iolin
Version:
Pure TypeScript implementation of ZeroSpace game data processing (PKL-free)
104 lines • 4.06 kB
JavaScript
/**
* Steelsworn - Legion's elite warrior unit with momentum building
* Professional soldiers who combine faith with flawless combat technique
*/
import { LegionArmyUnit } from "../../../../defaults/legion.js";
import { Attack, Upgrade } from "../../../../engine/ability.js";
export class Steelsworn extends LegionArmyUnit {
constructor() {
super();
this.hexiteCost = 75;
this.fluxCost = 0;
this.buildTime = 24;
this.buildCount = 1;
this.name = "Steelsworn";
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";
// Mutable properties - elite warrior with superior capabilities
this.supply = 2;
this.hp = 200;
this.shields = 0;
this.armor = 1;
this.armorType = "medium";
this.speed = 500;
this.turnSpeed = 5000;
this.hotkey = "W";
// Relationships - created by Legion Barracks
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.";
// Tags for identification and targeting
this.tag("legion:thrall");
// Elite melee combat system with anti-light armor specialization
this.attacks.attack = new Attack({
name: "Attack",
damage: 18,
cooldown: 1.37,
cooldownBetweenShots: 1.37,
range: 120,
targets: ["ground"],
bonusDamage: [{ multiplier: 2.0, vs: ["armor:light"] }],
armorPenetration: 0,
delay: 0.15,
parentId: this.id,
parentUUID: this.uuid,
});
// Capture instance for upgrade apply methods
const unit = this;
// Alloy Armor upgrade - stacking attack speed bonus
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() {
// Implementation handled by game engine for stacking bonuses
},
parentId: this.id,
parentUUID: this.uuid,
});
// Saw upgrade - enhanced anti-light armor damage
this.upgrades.saw = new Upgrade({
name: "Saw",
description: "Additional +100% damage against light armor",
tier: "T1.5",
fluxCost: 100,
researchTime: 40,
apply() {
// Enhance existing light armor bonus from 100% to 200%
unit.attacks.attack.bonusDamage = [{ multiplier: 3.0, vs: ["armor:light"] }];
},
parentId: this.id,
parentUUID: this.uuid,
});
// Performance Enhancers upgrade - movement speed bonus
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,
});
}
}
// Static property for source path
Steelsworn.src = "src/zerospace/faction/legion/unit/steelsworn.ts";
export default Steelsworn;
//# sourceMappingURL=steelsworn.js.map