@zerospacegg/iolin
Version:
Pure TypeScript implementation of ZeroSpace game data processing (PKL-free)
92 lines • 3.54 kB
JavaScript
/**
* Steelsworn - Legion's elite warrior unit with momentum building
* Professional soldiers who combine faith with flawless combat technique
*/
import { Attack, Upgrade } from "../../../../engine/ability.js";
import { LegionArmyUnit } from "../../legion-classes.js";
import Citadel from "../building/citadel.js";
import LegionBarracks from "../building/legion-barracks.js";
export class Steelsworn extends LegionArmyUnit {
constructor() {
super();
this.name = "Steelsworn";
this.tier = "T1";
this.hexiteCost = 75;
this.fluxCost = 0;
this.buildTime = 24;
this.buildCount = 1;
this.uuid = "94c059bd-31df-459c-9fb7-cf20ac2bf2a9";
// Mutable properties - elite warrior with superior capabilities
this.supply = 2;
this.hp = 320; // Elite durability
this.shields = 0;
this.armor = 1;
this.armorType = "medium";
this.speed = 500; // Enhanced by training and faith
this.hotkey = "W";
// Relationships - created by Legion Barracks
this.createdBy = [LegionBarracks.id];
this.unlockedBy = [LegionBarracks.id];
this.upgradedBy = [Citadel.id];
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,
range: 120,
targets: ["ground"],
bonusDamage: [{ multiplier: 1.5, vs: ["armor:light"] }],
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 50% to 150%
unit.attacks.attack.bonusDamage = [{ multiplier: 2.5, 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