ZSGG Public Library
Havoc
Xol T2 Army Unit
import { XolArmyUnit } from "../../../../defaults/xol.js";
import { Passive, Spell } from "../../../../engine/ability.js";
// Created only by transforming a Roller with the Xol Havoc topbar.
export class Havoc extends XolArmyUnit {
/** Read from the UI. The formula gives 22.5 against its 200/200, so this one is set by hand. */
override replicateCostOverride = 32.5;
override uuid: string;
static override src = "src/zerospace/faction/xol/unit/havoc.ts";
/** Summoned and free, and assumed untargetable by Infusion until someone can test it. */
override eligibleForInfusionOverride = false;
constructor() {
super();
this.name = "Havoc";
this.description = "Large rolling unit. Can load up to 8 Rollers as cargo.";
this.tier = "T2";
this.uuid = "845a6e75-ff47-4e45-9c68-61ff2e945514";
// Not buildable — a Roller becomes one via the Havoc topbar — but it carries an intrinsic
// cost anyway, which is what prices Replicate and Reanimate against it.
this.internalId = "Troop_Xol_Havoc_C";
this.internalTags = [
"Attackable.Unit.Troop",
"Local.Xol.Havoc",
"Attackable.SecondaryType.Vehicle",
"Attackable.ArmorType.Medium",
"Troop.Xol.Tier2",
];
this.internalSecondaryTags = ["Vehicle"];
this.hexiteCost = 200;
this.fluxCost = 200;
this.hp = 400;
this.shields = 0;
this.armor = 1;
this.armorType = "medium";
this.speed = 900;
this.supply = 4;
this.carryCapacity = 8;
this.cargoAllowedUnits = ["faction/xol/unit/roller"];
this.transformsFrom = ["faction/xol/unit/roller"];
this.passives.rollOver = new Passive({
name: "Roll Over",
description:
"Damages units underneath the Havoc every 0.1 seconds while moving, up to 40 damage per hit at maximum speed. Deals no damage while stationary. Maximum-speed damage increases by approximately 5 per loaded Roller.",
damage: 40,
cooldown: 0.1,
targetMode: "around-self",
targets: ["ground"],
parentId: this.id,
parentUUID: this.uuid,
});
this.spells.crash = new Spell({
name: "Crash",
description:
"Launches the Havoc forward into the air, exploding on impact for 600 area damage and launching all loaded Rollers. Destroys the Havoc.",
hotkey: "C",
cooldown: 10,
damage: 600,
diesOnUse: true,
targets: ["map"],
targetMode: "location",
parentId: this.id,
parentUUID: this.uuid,
});
}
}
export default Havoc;