@zerospacegg/iolin
Version:
Pure TypeScript implementation of ZeroSpace game data processing (PKL-free)
84 lines • 2.96 kB
JavaScript
/**
* Titan - Protectorate medium mech unit
* Robot commando with jump capabilities
*/
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 Titan extends ProtectorateArmyUnit {
get infuseCost() {
return 11;
}
constructor() {
super();
this.name = "Titan";
this.tier = "T2.5";
this.supply = 5;
this.hexiteCost = 100;
this.fluxCost = 100;
this.buildTime = 40;
this.uuid = "05d86203-d9ef-4ea8-bde2-a8801a1b122f";
// Mutable properties in constructor
this.hp = 425;
this.armor = 0;
this.armorType = "medium";
this.speed = 656;
this.maxAddOns = 0;
this.description = "Light mech walker. Attacks ground and air units.";
// Combat abilities
this.attacks.attack = new Attack({
name: "Attack",
damage: 6,
cooldown: 0.9,
range: 1000,
targets: ["ground"],
shots: 2,
volleys: 2,
bonusDamage: [{ multiplier: 1.75, vs: ["armor:medium"] }],
parentId: this.id,
parentUUID: this.uuid,
});
this.spells.jump = new Spell({
name: "Jump",
description: "Jumps to the target point, bypassing any terrain. Can attack while jumping",
hotkey: "D",
cooldown: 18,
forceAutocast: false,
unlocked: false,
parentId: this.id,
parentUUID: this.uuid,
});
// Upgrades
this.upgrades.jetpack = new Upgrade({
name: "Jetpack",
description: "Unlocks the Jump ability",
tier: "T2.5",
fluxCost: 100,
researchTime: 40,
apply: () => {
this.spells.jump.unlocked = true;
},
parentId: this.id,
parentUUID: this.uuid,
});
this.upgrades.attackRange = new Upgrade({
name: "Attack Range",
description: "Increase Atlas Anti-air attack range by 400",
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 = [MechanicalResearchLab.id];
// Tags for identification and targeting
this.tags.push("attacker", "spellcaster", "can-be-infused", "can-be-reanimated", "can-be-mind-controlled");
}
}
Titan.src = "src/zerospace/faction/protectorate/unit/titan.ts";
export default Titan;
//# sourceMappingURL=titan.js.map