ZSGG Public Library
World Engine
Xol T0 Base Building
import { XolBaseBuilding } from "../../../../defaults/xol.js";
import { Attack } from "../../../../engine/ability.js";
import { Turret } from "../../../../engine/turret.js";
export class WorldEngine extends XolBaseBuilding {
override uuid: string;
static override src = "src/zerospace/faction/xol/building/world-engine.ts";
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 = "c32ed2db-15b0-4048-b86d-4e5f73ba048b";
this.hexiteCost = 400;
this.fluxCost = 0;
this.buildTime = 60;
this.buildCount = 1;
this.hp = 2500;
this.armorType = "building";
this.maxTurrets = 1;
this.creates = ["faction/xol/building/extractor"];
this.unlocks = ["faction/xol/building/extractor"];
const worldEngine = this;
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.worldEngineTurret = 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.worldEngineTurret.id];
}
}
export default WorldEngine;