@zerospacegg/iolin
Version:
Pure TypeScript implementation of ZeroSpace game data processing (PKL-free)
91 lines • 3.26 kB
JavaScript
/**
* Reaver - Grell heavy assault unit with devastating charge abilities
* Bio-engineered shock assault specialist with ABES-powered charge mechanics
*/
import { Attack, Spell, Upgrade } from "../../../../engine/ability.js";
import { GrellArmyUnit } from "../../grell-classes.js";
import LargeIncubator from "../building/large-incubator.js";
import SpecialAugmentationPool from "../building/special-augmentation-pool.js";
export class Reaver extends GrellArmyUnit {
constructor() {
super();
this.name = "Reaver";
this.tier = "T3";
this.hotkey = "A";
this.hexiteCost = 200;
this.fluxCost = 100;
this.buildTime = 60;
this.buildCount = 1;
this.uuid = "8b84edd6-82cc-49a3-ada1-250a03eeffd5";
this.unlockedBy = [SpecialAugmentationPool.id];
this.createdBy = [LargeIncubator.id];
this.upgradedBy = [SpecialAugmentationPool.id];
this.description = "Tanky melee unit with charge. Attacks ground units.";
this.hp = 900;
this.shields = 0;
this.armor = 3;
this.armorType = "heavy";
this.speed = 525;
this.supply = 8;
this.stunResist = 50;
// Capture reaver instance for upgrade apply methods
const reaver = this;
// Biomass healing passive inherited automatically from GrellArmyUnit
this.attacks.attack = new Attack({
name: "Attack",
damage: 51,
cooldown: 2,
range: 175,
targets: ["ground"],
volleys: 2,
splash: {
multiplier: 0.5,
range: 60,
},
parentId: this.id,
parentUUID: this.uuid,
});
this.spells.charge = new Spell({
name: "Charge",
description: "Charge into enemies knocking them back and dealing 80 damage",
hotkey: "R",
damage: 80,
targets: ["ground"],
energyCost: 15,
energyType: "abes",
parentId: this.id,
parentUUID: this.uuid,
});
// Upgrades
this.upgrades.improvedCharge = new Upgrade({
name: "Improved Charge",
description: "Charge deals +50% damage",
tier: "T3.5",
fluxCost: 100,
researchTime: 50,
apply: () => {
if (reaver.spells.charge && reaver.spells.charge.damage) {
reaver.spells.charge.damage = Math.floor(reaver.spells.charge.damage * 1.5); // 80 * 1.5 = 120
}
},
parentId: this.id,
parentUUID: this.uuid,
});
this.upgrades.toughenedCarapace = new Upgrade({
name: "Toughened Carapace",
description: "+3 armor",
tier: "T3.5",
fluxCost: 100,
researchTime: 50,
apply: () => {
reaver.armor = (reaver.armor || 0) + 3; // 3 + 3 = 6
},
parentId: this.id,
parentUUID: this.uuid,
});
}
}
// Static property for source path
Reaver.src = "src/zerospace/faction/grell/unit/reaver.ts";
export default Reaver;
//# sourceMappingURL=reaver.js.map