@zerospacegg/iolin
Version:
Pure TypeScript implementation of ZeroSpace game data processing (PKL-free)
70 lines • 2.74 kB
JavaScript
/**
* Dark Disciple - Legion's fanatical ranged unit with death frenzy
* Enhanced spiritual perception and battle fury triggered by ally martyrdom
*/
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";
import TerrorTower from "../building/terror-tower.js";
export class DarkDisciple extends LegionArmyUnit {
get infuseCost() {
return 8;
}
constructor() {
super();
this.name = "Dark Disciple";
this.tier = "T2";
this.hexiteCost = 50;
this.fluxCost = 125;
this.buildTime = 36;
this.buildCount = 1;
this.uuid = "2fb97e7f-e4d5-4517-aa50-a903aed222ca";
this.description =
"Light ranged infantry. Its damage increases the longer it attacks. Attacks ground and air units.";
// Mutable properties - fanatical ranged warrior with enhanced perception
this.supply = 4;
this.hp = 225;
this.shields = 0;
this.armor = 0;
this.armorType = "light";
this.speed = 525; // Enhanced by religious fervor
this.hotkey = "E";
// Relationships - unlocked by Terror Tower
this.createdBy = [LegionBarracks.id];
this.unlockedBy = [TerrorTower.id];
this.upgradedBy = [Citadel.id];
// Tags for identification and targeting
this.tag("legion:thrall");
// Fast ranged attack with exceptional range
this.attacks.attack = new Attack({
name: "Attack",
damage: 8,
cooldown: 0.8,
range: 1400,
targets: ["air", "ground"],
parentId: this.id,
parentUUID: this.uuid,
});
this.upgrades.frenzy = new Upgrade({
name: "Frenzy",
description: "Dying nearby Thralls increases its attack speed by 35% for 10s. Max 14 stacks (was 20).",
tier: "T3.5",
fluxCost: 125,
researchTime: 50,
apply() {
// Frenzy effect applied when nearby Thralls die
// Max stacks reduced from 20 to 14, attack speed buff per shot increased from 30% to 35%
// Implementation handled by game engine
//
// this one is a little difficult to implement in iolin right now
},
parentId: this.id,
parentUUID: this.uuid,
});
}
}
// Static property for source path
DarkDisciple.src = "src/zerospace/faction/legion/unit/dark-disciple.ts";
export default DarkDisciple;
//# sourceMappingURL=dark-disciple.js.map