UNPKG

@zerospacegg/iolin

Version:

Pure TypeScript implementation of ZeroSpace game data processing (PKL-free)

101 lines 4.34 kB
"use strict"; /** * Supply Platform - Protectorate modular supply building * Supply building with three different add-on upgrade options */ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.SupplyPlatform = 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 operating_tower_js_1 = __importDefault(require("./operating-tower.cjs")); const prot_barracks_js_1 = __importDefault(require("./prot-barracks.cjs")); const research_lab_js_1 = __importDefault(require("./research-lab.cjs")); class SupplyPlatform extends protectorate_classes_js_1.ProtectorateSupplyBuilding { constructor() { super(); this.name = "Supply Platform"; this.tier = "T0"; this.hexiteCost = 100; this.fluxCost = 0; this.buildTime = 12; this.uuid = "3de70e15-5469-4834-aa4d-b86fbe7ceb55"; this.hp = 700; this.shields = 0; this.armorType = "light"; // Building relationships this.createdBy = [prot_build_drone_js_1.default.id]; this.unlockedBy = [operating_tower_js_1.default.id]; this.unlocks = [prot_barracks_js_1.default.id, research_lab_js_1.default.id]; // 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 (+25 supply, making total 40) supplyPlatform.providesSupply = (supplyPlatform.providesSupply || 0) + 25; }, }); // 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