@zerospacegg/iolin
Version:
Pure TypeScript implementation of ZeroSpace game data processing (PKL-free)
91 lines • 3.32 kB
JavaScript
/**
* Predator - Protectorate light reconnaissance vehicle
* Fast attack vehicle with mine-laying capabilities and superior mobility
*/
import { Attack, Spell, Upgrade } from "../../../../engine/ability.js";
import { ProtectorateArmyUnit } from "../../protectorate-classes.js";
import Factory from "../building/factory.js";
import MechanicalResearchLab from "../building/mechanical-research-lab.js";
export class Predator extends ProtectorateArmyUnit {
get infuseCost() {
return 6;
}
constructor() {
super();
this.name = "Predator";
this.tier = "T2";
this.supply = 3;
this.hexiteCost = 100;
this.fluxCost = 25;
this.buildTime = 32;
this.uuid = "c8c73071-90af-403f-9929-32efb79242c3";
// Mutable properties in constructor
this.hp = 175;
this.armor = 0;
this.armorType = "light";
this.speed = 900;
this.maxAddOns = 0;
this.description = "Fast vehicle that can lay mines. Attacks ground units.";
// Combat abilities
this.attacks.attack = new Attack({
name: "Attack",
damage: 15,
cooldown: 1.6,
range: 650,
targets: ["ground"],
volleys: 2,
bonusDamage: [{ multiplier: 1.5, vs: ["armor:medium"] }],
parentId: this.id,
parentUUID: this.uuid,
});
this.spells.layMine = new Spell({
name: "Lay Mine",
description: "Lay a chaser mine (50hp, cloaked, deals 50 dmg when an enemy gets close)",
cooldown: 120,
forceAutocast: false,
unlocked: false,
parentId: this.id,
parentUUID: this.uuid,
});
// Upgrades
this.upgrades.bonusShield = new Upgrade({
name: "Bonus Shield",
description: "Gain 100 shields",
tier: "T2.5",
fluxCost: 100,
researchTime: 50,
parentId: this.id,
parentUUID: this.uuid,
});
this.upgrades.chaserMine = new Upgrade({
name: "Chaser Mine",
description: "Unlocks chaser mine ability",
tier: "T2.5",
fluxCost: 100,
researchTime: 40,
apply: () => {
this.spells.layMine.unlocked = true;
},
parentId: this.id,
parentUUID: this.uuid,
});
this.upgrades.piercingBolt = new Upgrade({
name: "Piercing Bolt",
description: "The Predator's cannon will periodically shoot a projectile reducing enemy health by 10%.",
tier: "T3.5",
fluxCost: 150,
researchTime: 60,
parentId: this.id,
parentUUID: this.uuid,
});
// Entity relationships using static ID references
this.createdBy = [Factory.id];
this.upgradedBy = [MechanicalResearchLab.id];
this.unlockedBy = [Factory.id];
// Tags for identification and targeting
this.tags.push("attacker", "spellcaster", "can-be-infused", "can-be-reanimated", "can-be-mind-controlled");
}
}
Predator.src = "src/zerospace/faction/protectorate/unit/predator.ts";
export default Predator;
//# sourceMappingURL=predator.js.map