@zerospacegg/iolin
Version:
Pure TypeScript implementation of ZeroSpace game data processing (PKL-free)
84 lines • 3.7 kB
JavaScript
"use strict";
/**
* Operating Tower - Protectorate command center
* Main base building that serves as the faction's central command hub
*/
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.OperatingTower = void 0;
const ability_js_1 = require("../../../../engine/ability.cjs");
const turret_js_1 = require("../../../../engine/turret.cjs");
const protectorate_classes_js_1 = require("../../protectorate-classes.cjs");
const prot_build_drone_js_1 = __importDefault(require("../unit/prot-build-drone.cjs"));
const prot_harvester_js_1 = __importDefault(require("../unit/prot-harvester.cjs"));
const prot_scout_drone_js_1 = __importDefault(require("../unit/prot-scout-drone.cjs"));
const prot_extractor_js_1 = __importDefault(require("./prot-extractor.cjs"));
const supply_platform_js_1 = __importDefault(require("./supply-platform.cjs"));
class OperatingTower extends protectorate_classes_js_1.ProtectorateBaseBuilding {
constructor() {
super();
this.name = "Operating Tower";
this.tier = "T0";
this.hexiteCost = 400;
this.fluxCost = 0;
this.buildTime = 60;
this.buildCount = 1;
this.hotkey = "Q";
this.uuid = "a8166e7b-4a15-4ce7-b307-674adc8e9959";
this.hp = 2000;
this.shields = 0;
this.armorType = "heavy";
// Capture operating tower instance for turret apply method
const operatingTower = this;
// Building relationships
this.createdBy = [prot_build_drone_js_1.default.id];
this.creates = [prot_build_drone_js_1.default.id, prot_extractor_js_1.default.id, prot_harvester_js_1.default.id, prot_scout_drone_js_1.default.id];
this.unlocks = [supply_platform_js_1.default.id, prot_build_drone_js_1.default.id, prot_harvester_js_1.default.id];
// Home Base spell - set as primary base for recall priority
this.spells.homeBase = new ability_js_1.Spell({
name: "Home Base",
hotkey: "U",
cooldown: 0.2,
targets: ["self"],
description: "Set this base as primary",
parentId: this.id,
parentUUID: this.uuid,
});
// Turret capability
this.maxAddOns = 1;
// Defensive turret capability
this.turrets.operatingTowerDefender = new turret_js_1.Turret({
name: "Operating Tower Defender",
description: "Adds defensive capabilities to the command center",
hexiteCost: 200,
buildTime: 5,
hp: 500, // HP addition amount
unlocked: false,
apply() {
// Add HP boost (+500 HP, making total 2500)
operatingTower.hp = (operatingTower.hp || 0) + 500;
// Unlock defensive attack ability
operatingTower.attacks.defense.unlocked = true;
},
});
// Defensive attack ability (unlocked by turret)
this.attacks.defense = new ability_js_1.Attack({
name: "Defense",
description: "Defensive turret attack",
damage: 15,
cooldown: 1.2,
range: 1400,
targets: ["air", "ground"],
unlocked: false,
parentId: this.id,
parentUUID: this.uuid,
});
}
}
exports.OperatingTower = OperatingTower;
// Static property for source path
OperatingTower.src = "src/zerospace/faction/protectorate/building/operating-tower.ts";
exports.default = OperatingTower;
//# sourceMappingURL=operating-tower.js.map