@zerospacegg/iolin
Version:
Pure TypeScript implementation of ZeroSpace game data processing (PKL-free)
103 lines • 4.54 kB
JavaScript
/**
* Mammoth - Legion's massive war beast with rider system
* Colossal creature with religious bonding and devastating anti-building attacks
*/
import { LegionArmyUnit } from "../../../../defaults/legion.js";
import { Attack, Passive, Spell, Upgrade } from "../../../../engine/ability.js";
export class Mammoth extends LegionArmyUnit {
// Readonly properties (never change after creation)
get infuseCost() {
return 13;
}
constructor() {
super();
this.hexiteCost = 200;
this.fluxCost = 125;
this.buildTime = 45;
this.buildCount = 1;
this.name = "Mammoth";
this.tier = "T2";
this.internalId = "Troop_Empire_Mammoth_C";
this.internalPath = "/Game/Nova/Archetypes_Troops/Troop_Empire_Mammoth.Default__Troop_Empire_Mammoth_C";
this.uuid = "86d4965a-0320-48d7-bc41-7343522ad7fb";
this.internalTags = [
"Attackable.Unit.Troop",
"Attackable.Biological",
"Local.Legion.Infantry.Mammoth",
"Attackable.ArmorType.Heavy",
];
this.internalSecondaryTags = [];
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 = 350;
this.turnSpeed = 5000;
// Relationships - created by beastiary, unlocked by terror tower
this.createdBy = ["faction/legion/building/beastiary"];
this.unlockedBy = ["faction/legion/building/terror-tower"];
this.upgradedBy = ["faction/legion/building/citadel"];
// Devastating anti-building attack
this.attacks.attack = new Attack({
name: "Attack",
damage: 90,
cooldown: 2.0,
cooldownBetweenShots: 0.5,
armorPenetration: 0,
delay: 0.58,
range: 250,
targets: ["ground"],
bonusDamage: [{ multiplier: 3.0, vs: ["building"] }], // 100% → 200% structure damage bonus
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 Fanatic may ride the Mammoth. Bonuses: Mounted Thrall has +100% attack speed and +5% move speed (10% with upgrade). Mounted Steelsworn gives +4 armor to the Mammoth (8 with upgrade). Mounted Fanatic 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