@zerospacegg/iolin
Version:
Pure TypeScript implementation of ZeroSpace game data processing (PKL-free)
107 lines • 4.19 kB
JavaScript
/**
* Thresher - Grell siege artillery unit with toggle mode mechanics
* Heavy armor, extreme range attacks, and siege transformation capabilities
*/
import { GrellArmyUnit } from "../../../../defaults/grell.js";
import { Attack, Passive, Siege, Upgrade } from "../../../../engine/ability.js";
export class Thresher extends GrellArmyUnit {
get infuseCost() {
return 15;
}
constructor() {
super();
// Auto-generated fixes from dev data comparison
this.hexiteCost = 100;
this.fluxCost = 175;
this.buildTime = 50;
this.buildCount = 1;
this.name = "Thresher";
this.tier = "T2.5";
this.hotkey = "S";
this.uuid = "a7240b28-2b4c-46a8-9294-58c898ca7555";
// Internal game engine data
this.internalId = "Troop_GrellThresher_C";
this.internalPath = "/Game/Nova/Archetypes_Troops/Troop_GrellThresher.Default__Troop_GrellThresher_C";
this.internalTags = [
"Attackable.Unit.Troop",
"Attackable.ArmorType.Heavy",
"Attackable.Biological",
"Local.Grell.Thresher",
];
this.internalSecondaryTags = [];
this.unlockedBy = ["faction/grell/building/advanced-augmentation-pool"];
this.createdBy = ["faction/grell/building/medium-incubator"];
this.upgradedBy = ["faction/grell/building/advanced-augmentation-pool"];
// Capture instance for upgrade apply methods
const unit = this;
this.hp = 375;
this.shields = 0;
this.armor = 1;
this.armorType = "heavy";
this.speed = 450;
this.supply = 8;
this.turnSpeed = 2000;
this.pushability = 0;
this.description = "Long range siege unit with splash damage. Attacks ground units.";
this.attacks.attack = new Attack({
name: "Attack",
damage: 120,
range: 2700,
cooldown: 3.3,
cooldownBetweenShots: 0.5,
targets: ["ground"],
bonusDamage: [{ multiplier: 1.5, vs: ["building"] }],
splash: { multiplier: 0.85, range: 275 },
armorPenetration: 0,
delay: 0.45,
parentId: this.id,
parentUUID: this.uuid,
});
this.sieges.siegeMode = new Siege({
name: "Siege Mode",
description: "Sieging is required for the thresher to attack. Movement requires being unsieged. 1.25s duration.",
hotkey: "D",
togglesMode: "siege",
reverseHotKey: "Ctrl-D",
duration: 1.25,
});
// Siege status resistance passive
this.passives.siegeResistance = new Passive({
name: "Siege Resistance",
description: "+75% status resist while sieged",
parentId: this.id,
parentUUID: this.uuid,
});
this.upgrades.cracklingEnergy = new Upgrade({
name: "Crackling Energy",
description: "Projectiles create a burning effect on ground (140 damage over 6s via 7dmg every 0.3s for 20 hits)",
tier: "T3.5",
fluxCost: 100,
researchTime: 50,
apply() {
unit.attacks.attack.description += " - Creates burning ground effect (140 damage over 6s)";
},
parentId: this.id,
parentUUID: this.uuid,
});
this.upgrades.limbAugmentation = new Upgrade({
name: "Limb Augmentation",
description: "Sieging and unsieging is 50% faster (0.625s), +20% movement speed",
tier: "T3.5",
fluxCost: 100,
researchTime: 50,
apply() {
unit.speed = (unit.speed || 0) * 1.2;
if (unit.sieges.siegeMode) {
unit.sieges.siegeMode.duration = (unit.sieges.siegeMode.duration || 0) * 0.5;
}
},
parentId: this.id,
parentUUID: this.uuid,
});
}
}
// Static property for source path
Thresher.src = "src/zerospace/faction/grell/unit/thresher.ts";
export default Thresher;
//# sourceMappingURL=thresher.js.map