@zerospacegg/iolin
Version:
Pure TypeScript implementation of ZeroSpace game data processing (PKL-free)
94 lines • 3.93 kB
JavaScript
"use strict";
/**
* Supply Platform - Protectorate modular supply building
* Supply building with three different add-on upgrade options
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.SupplyPlatform = void 0;
const protectorate_js_1 = require("../../../../defaults/protectorate.cjs");
const ability_js_1 = require("../../../../engine/ability.cjs");
const turret_js_1 = require("../../../../engine/turret.cjs");
class SupplyPlatform extends protectorate_js_1.ProtectorateSupplyBuilding {
constructor() {
super();
this.hexiteCost = 75;
this.fluxCost = 0;
this.buildTime = 12;
this.name = "Supply Platform";
this.tier = "T0";
this.uuid = "3de70e15-5469-4834-aa4d-b86fbe7ceb55";
this.hp = 700;
this.shields = 0;
this.armorType = "light";
// Building relationships
this.createdBy = ["faction/protectorate/unit/prot-build-drone"];
this.unlockedBy = ["faction/protectorate/building/operating-tower"];
this.unlocks = ["faction/protectorate/building/prot-barracks", "faction/protectorate/building/research-lab"];
// Add-on system (maxAddOns = 1)
this.maxAddOns = 1;
// Capture supply platform instance for turret apply methods
const supplyPlatform = this;
// Enhanced Supply Platform add-on
this.turrets.enhancedSupplyPlatform = new turret_js_1.Turret({
name: "Enhanced Supply Platform",
description: "Increases supply capacity and structural integrity",
hexiteCost: 100,
buildTime: 3,
hp: 550, // HP addition amount
unlocked: false,
apply() {
// Add HP boost (+550 HP, making total 1250)
supplyPlatform.hp = (supplyPlatform.hp || 0) + 550;
// Add supply boost (+18 supply, making total 33)
supplyPlatform.providesSupply = (supplyPlatform.providesSupply || 0) + 18;
},
});
// Sensor Platform add-on
this.turrets.sensorPlatform = new turret_js_1.Turret({
name: "Sensor Platform",
description: "Dramatically increases vision range for battlefield intelligence",
hexiteCost: 50,
buildTime: 12,
hp: 300, // HP addition amount
unlocked: false,
apply() {
// Add HP boost (+300 HP, making total 1000)
supplyPlatform.hp = (supplyPlatform.hp || 0) + 300;
// Enhance vision range
supplyPlatform.vision = 3600;
},
});
// Turret Platform add-on
this.turrets.turretPlatform = new turret_js_1.Turret({
name: "Turret Platform",
description: "Adds defensive turret capabilities",
hexiteCost: 75,
buildTime: 25,
hp: 175, // HP addition amount
unlocked: false,
apply() {
// Add HP boost (+175 HP, making total 875)
supplyPlatform.hp = (supplyPlatform.hp || 0) + 175;
// Unlock defensive attack ability
supplyPlatform.attacks.attack.unlocked = true;
},
});
// Defensive attack ability (unlocked by turret platform)
this.attacks.attack = new ability_js_1.Attack({
name: "Attack",
description: "Defensive turret attack",
damage: 10,
cooldown: 1.2,
range: 1200,
targets: ["air", "ground"],
unlocked: false,
parentId: this.id,
parentUUID: this.uuid,
});
}
}
exports.SupplyPlatform = SupplyPlatform;
// Static property for source path
SupplyPlatform.src = "src/zerospace/faction/protectorate/building/supply-platform.ts";
exports.default = SupplyPlatform;
//# sourceMappingURL=supply-platform.js.map