UNPKG

@zerospacegg/iolin

Version:

Pure TypeScript implementation of ZeroSpace game data processing (PKL-free)

91 lines 3.98 kB
/** * Mammoth - Legion's massive war beast with rider system * Colossal creature with religious bonding and devastating anti-building attacks */ import { Attack, Passive, Spell, Upgrade } from "../../../../engine/ability.js"; import { LegionArmyUnit } from "../../legion-classes.js"; import Beastiary from "../building/beastiary.js"; import Citadel from "../building/citadel.js"; import TerrorTower from "../building/terror-tower.js"; export class Mammoth extends LegionArmyUnit { get infuseCost() { return 13; } constructor() { super(); this.name = "Mammoth"; this.tier = "T2"; this.hexiteCost = 150; this.fluxCost = 100; this.buildTime = 45; this.buildCount = 1; this.uuid = "86d4965a-0320-48d7-bc41-7343522ad7fb"; this.description = "Heavy beast that can be ridden by Legion infantry units. Thralls makes it move faster. Steelsworn provide additional armor, and Dark Disciples make it shock nearby enemies when attacking. Attacks ground units."; // Mutable properties - massive war beast with rider capabilities this.supply = 8; // Large creature consumes significant supply this.hp = 900; // Colossal durability this.shields = 0; this.armor = 0; this.armorType = "medium"; this.speed = 425; // Relationships - created by beastiary, unlocked by terror tower this.createdBy = [Beastiary.id]; this.unlockedBy = [TerrorTower.id]; this.upgradedBy = [Citadel.id]; // Devastating anti-building attack this.attacks.attack = new Attack({ name: "Attack", damage: 120, cooldown: 4.0, range: 250, targets: ["ground"], bonusDamage: [{ multiplier: 2.0, vs: ["building"] }], parentId: this.id, parentUUID: this.uuid, }); // Rider system - units can mount for tactical bonuses this.passives.thrallRider = new Passive({ name: "Thrall Rider", description: "A Thrall, Steelsworn, or Dark Disciple may ride the Mammoth. Bonuses: Mounted Thrall has +100% attack speed and +5% move speed (10% with upgrade). Mounted Steelsworn gives +3 armor to the Mammoth (6 with upgrade). Mounted Dark Disciple gives the Mammoth 40 area damage in its attack and unlocks Storm ability.", parentId: this.id, parentUUID: this.uuid, }); // Stomp aura - constant area damage to units underneath this.passives.trample = new Passive({ name: "Stomp", description: "Deals 30 damage to units directly underneath the mammoth", damage: 30, cooldown: 1, parentId: this.id, parentUUID: this.uuid, }); // Storm spell - requires Dark Disciple rider this.spells.storm = new Spell({ name: "Storm", description: "Casts a storm at a target location, dealing damage to units in the area for 5 seconds. Requires Dark Disciple rider. (20dmg every 1s, 100dmg total)", energyCost: 30, targets: ["map"], parentId: this.id, parentUUID: this.uuid, }); // Capture instance for upgrade apply methods const unit = this; // Ironhide Accord upgrade - doubles all troop bonuses this.upgrades.ironhideAccord = new Upgrade({ name: "Ironhide Accord", description: "Doubles all troop bonuses", tier: "T2.5", fluxCost: 150, researchTime: 50, apply() { // Implementation handled by game engine for rider bonuses }, parentId: this.id, parentUUID: this.uuid, }); } } // Static property for source path Mammoth.src = "src/zerospace/faction/legion/unit/mammoth.ts"; export default Mammoth; //# sourceMappingURL=mammoth.js.map