ZSGG Public Library
World Engine
Xol Co-Op T0 Base Building
import { XolBaseBuilding } from "../../../../../defaults/xol.js";
import { Attack } from "../../../../../engine/ability.js";
import { Turret } from "../../../../../engine/turret.js";
export class CoopWorldEngine extends XolBaseBuilding {
static override src = "src/zerospace/coop/commander/anrubic/building/coop-anrubic-world-engine.ts";
override get variantOf(): string {
return "faction/xol/building/world-engine";
}
constructor() {
super();
this.name = "World Engine";
this.description = "Mining outpost which builds extractors to mine Hexite. \nCan be upgraded to attack.";
this.tier = "T0";
this.hotkey = "Q";
this.uuid = "9ef5cfbc-4485-409a-9c5f-7d5eeeeed8e1";
this.hexiteCost = 400;
this.fluxCost = 0;
this.buildTime = 60;
this.buildCount = 1;
this.hp = 2500;
this.armorType = "building";
this.maxTurrets = 1;
const worldEngine = this; //TODO Why this code design? Hallucinated?
this.turrets.worldEngineTurret = new Turret({
name: "World Engine Turret",
description: "Upgrades the World Engine to attack ground and air targets.",
hexiteCost: 150,
buildTime: 22,
hp: 1000,
armor: 1,
range: 2000,
unlocked: false,
apply() {
worldEngine.hp = (worldEngine.hp || 0) + 1000;
worldEngine.armor = (worldEngine.armor || 0) + 1;
},
});
this.attacks.attack = new Attack({
name: "Attack",
damage: 16,
cooldown: 0.45,
range: 2000,
targets: ["ground", "air"],
unlocked: false,
unlockedBy: [this.turrets.worldEngineTurret.id],
parentId: this.id,
parentUUID: this.uuid,
});
this.turrets.worldEngineTurret.unlocks = [this.attacks.attack.id];
this.creates = ["coop/commander/anrubic/building/coop-anrubic-extractor"];
this.unlocks = ["coop/commander/anrubic/building/coop-anrubic-extractor"];
}
}
export default CoopWorldEngine;