@zerospacegg/iolin
Version:
Pure TypeScript implementation of ZeroSpace game data processing (PKL-free)
86 lines • 3.41 kB
JavaScript
/**
* Fanatic - Legion's fanatical ranged unit with death frenzy
* Enhanced spiritual perception and battle fury triggered by ally martyrdom
*/
import { LegionArmyUnit } from "../../../../defaults/legion.js";
import { Attack, Upgrade } from "../../../../engine/ability.js";
export class Fanatic extends LegionArmyUnit {
// Readonly properties (never change after creation)
get infuseCost() {
return 8;
}
constructor() {
super();
// Auto-generated fixes from dev data comparison
// Fix: Movement Speed
this.speed = 450;
// hp is set later in the mutable properties section
this.hexiteCost = 50;
this.fluxCost = 125;
this.buildTime = 36;
this.buildCount = 1;
this.name = "Fanatic";
this.tier = "T2";
this.internalId = "Troop_Empire_Psyker_C";
this.internalPath = "/Game/Nova/Archetypes_Troops/Troop_Empire_Psyker.Default__Troop_Empire_Psyker_C";
this.internalTags = [
"Attackable.Unit.Troop",
"Attackable.Unit.Light",
"Attackable.ArmorType.Light",
"Attackable.Biological",
"Local.Legion.Infantry.Psyker",
];
this.internalSecondaryTags = ["Infantry"];
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 = 180;
this.shields = 0;
this.armor = 0;
this.armorType = "light";
// Note: speed already set to 450 above
this.turnSpeed = 5000;
this.hotkey = "E";
// Relationships - unlocked by Terror Tower
this.createdBy = ["faction/legion/building/legion-barracks"];
this.unlockedBy = ["faction/legion/building/terror-tower"];
this.upgradedBy = ["faction/legion/building/citadel"];
// 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,
cooldownBetweenShots: 0.8,
armorPenetration: 0,
delay: 0.13,
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
Fanatic.src = "src/zerospace/faction/legion/unit/fanatic.ts";
export default Fanatic;
//# sourceMappingURL=fanatic.js.map