UNPKG

@zerospacegg/iolin

Version:

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

296 lines 14.4 kB
"use strict"; /** * Mera - Protectorate Coop Commander * Frontline cooperative commander with progressive leveling and advanced topbar abilities */ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.MeraCoop = exports.ProtectorateCoopCommander = void 0; const ability_js_1 = require("../../../engine/ability.cjs"); const commander_level_js_1 = require("../../../engine/commander-level.cjs"); const unit_js_1 = require("../../../engine/unit.cjs"); const protectorate_classes_js_1 = require("../../faction/protectorate-classes.cjs"); // Import all Protectorate COOP units and buildings for safe ID references const coop_mera_advanced_factory_js_1 = __importDefault(require("./mera/building/coop-mera-advanced-factory.cjs")); const coop_mera_airstrip_js_1 = __importDefault(require("./mera/building/coop-mera-airstrip.cjs")); const coop_mera_factory_js_1 = __importDefault(require("./mera/building/coop-mera-factory.cjs")); const coop_mera_mechanical_research_lab_js_1 = __importDefault(require("./mera/building/coop-mera-mechanical-research-lab.cjs")); const coop_mera_operating_tower_js_1 = __importDefault(require("./mera/building/coop-mera-operating-tower.cjs")); const coop_mera_prot_barracks_js_1 = __importDefault(require("./mera/building/coop-mera-prot-barracks.cjs")); const coop_mera_prot_extractor_js_1 = __importDefault(require("./mera/building/coop-mera-prot-extractor.cjs")); const coop_mera_research_lab_js_1 = __importDefault(require("./mera/building/coop-mera-research-lab.cjs")); const coop_mera_specialized_research_lab_js_1 = __importDefault(require("./mera/building/coop-mera-specialized-research-lab.cjs")); const coop_mera_supply_platform_js_1 = __importDefault(require("./mera/building/coop-mera-supply-platform.cjs")); const coop_mera_bastion_js_1 = __importDefault(require("./mera/unit/coop-mera-bastion.cjs")); const coop_mera_commando_js_1 = __importDefault(require("./mera/unit/coop-mera-commando.cjs")); const coop_mera_cyclops_js_1 = __importDefault(require("./mera/unit/coop-mera-cyclops.cjs")); const coop_mera_griffin_js_1 = __importDefault(require("./mera/unit/coop-mera-griffin.cjs")); const coop_mera_ironwing_js_1 = __importDefault(require("./mera/unit/coop-mera-ironwing.cjs")); const coop_mera_juggernaut_js_1 = __importDefault(require("./mera/unit/coop-mera-juggernaut.cjs")); const coop_mera_predator_js_1 = __importDefault(require("./mera/unit/coop-mera-predator.cjs")); const coop_mera_prot_build_drone_js_1 = __importDefault(require("./mera/unit/coop-mera-prot-build-drone.cjs")); const coop_mera_prot_harvester_js_1 = __importDefault(require("./mera/unit/coop-mera-prot-harvester.cjs")); const coop_mera_prot_scout_drone_js_1 = __importDefault(require("./mera/unit/coop-mera-prot-scout-drone.cjs")); const coop_mera_strider_js_1 = __importDefault(require("./mera/unit/coop-mera-strider.cjs")); const coop_mera_titan_js_1 = __importDefault(require("./mera/unit/coop-mera-titan.cjs")); // Create a Protectorate-specific coop commander class class ProtectorateCoopCommander extends unit_js_1.CoopCommanderUnit { constructor() { super(); // Note: uuid and name are abstract properties and should be handled by the concrete class this.commanderType = "frontline"; this.maxLevel = 12; this.faction = "protectorate"; this.factionName = "Protectorate"; } /** Get topbars available at current level */ getAvailableTopbars() { if (!this.commanderTopbars) { this.commanderTopbars = {}; } const available = {}; for (const [name, topbar] of Object.entries(this.commanderTopbars)) { if (!topbar.requiredLevel || topbar.requiredLevel <= this.currentLevel) { available[name] = topbar; } } return available; } /** Set commander level (affects available topbars) - chainable! */ withLevel(level) { this.currentLevel = Math.min(Math.max(1, level), this.maxLevel); return this; } } exports.ProtectorateCoopCommander = ProtectorateCoopCommander; ProtectorateCoopCommander.src = "src/zerospace/coop/commander/mera-commander.ts"; class MeraCoop extends ProtectorateCoopCommander { // Kawaii commander levels with proper naming! (◕‿◕)♡ // Now handled by base CoopCommanderUnit class - sugoi! ✨ constructor() { super(); this.uuid = "5562f476-0611-4941-bc0a-d62d2b06a3d0"; this.name = "Mera (Commander)"; this.commanderType = "frontline"; this.maxLevel = 12; // Enhanced stats for coop mode this.hp = 400; this.shields = 400; this.speed = 575; this.armor = 1; this.armorType = "medium"; // Commander faction access (all Protectorate COOP units except heroes and hellfire) this.commanderFaction = [ coop_mera_operating_tower_js_1.default.id, coop_mera_supply_platform_js_1.default.id, coop_mera_prot_barracks_js_1.default.id, coop_mera_factory_js_1.default.id, coop_mera_advanced_factory_js_1.default.id, coop_mera_research_lab_js_1.default.id, coop_mera_mechanical_research_lab_js_1.default.id, coop_mera_specialized_research_lab_js_1.default.id, coop_mera_airstrip_js_1.default.id, coop_mera_prot_extractor_js_1.default.id, coop_mera_prot_build_drone_js_1.default.id, coop_mera_prot_harvester_js_1.default.id, coop_mera_prot_scout_drone_js_1.default.id, coop_mera_commando_js_1.default.id, coop_mera_bastion_js_1.default.id, coop_mera_predator_js_1.default.id, coop_mera_ironwing_js_1.default.id, coop_mera_titan_js_1.default.id, coop_mera_cyclops_js_1.default.id, coop_mera_juggernaut_js_1.default.id, coop_mera_strider_js_1.default.id, coop_mera_griffin_js_1.default.id, ]; // Combat abilities - enhanced for coop this.attacks.swordAttack = new ability_js_1.Attack({ name: "Sword Attack", damage: 23, cooldown: 1.1, range: 150, targets: ["ground"], parentId: this.id, parentUUID: this.uuid, }); this.attacks.pulseRifle = new ability_js_1.Attack({ name: "Pulse Rifle", damage: 24, cooldown: 1.15, range: 1200, targets: ["ground", "air"], parentId: this.id, parentUUID: this.uuid, }); this.spells.dash = new ability_js_1.Spell({ name: "Dash", hotkey: "Q", cooldown: 13, description: "Dash while dealing 80 damage to enemy units and recharging 80 shields for each hit", duration: 10, parentId: this.id, parentUUID: this.uuid, }); this.spells.protectiveBarrier = new ability_js_1.Spell({ name: "Protective Barrier", hotkey: "W", cooldown: 40, description: "All friendly units and structures under the barrier take 33% less damage. Lasts 20s.", duration: 20, parentId: this.id, parentUUID: this.uuid, }); this.spells.weaponSwitch = new ability_js_1.Spell({ name: "Weapon Switch", cooldown: 10, description: "Mera switches between a Sword and a Blaster. Gains +30% attack speed for 5s.", hotkey: "E", parentId: this.id, parentUUID: this.uuid, }); // Topbar abilities this.commanderTopbars.shockwave = new protectorate_classes_js_1.ProtectorateTopbar({ name: "Shockwave", topbarType: "special", slot: 1, cooldown: 30, duration: 3, description: "Stuns enemy units in area for 3s", requiredLevel: 1, parentId: this.id, parentUUID: this.uuid, }); this.commanderTopbars.reinforcements = new protectorate_classes_js_1.ProtectorateTopbar({ name: "Reinforcements", topbarType: "summon", slot: 2, energyCost: 50, energyType: "topbar", description: "Calls down reinforcements of the selected type. Can only be used near Operating Towers", requiredLevel: 1, parentId: this.id, parentUUID: this.uuid, }); this.commanderTopbars.airstrike = new protectorate_classes_js_1.ProtectorateTopbar({ name: "Airstrike", topbarType: "special", slot: 3, description: "Calls down an Airstrike, dealing 200 damage to ground units. Requires airstrips.", requiredLevel: 3, parentId: this.id, parentUUID: this.uuid, }); this.commanderTopbars.designateOfficer = new protectorate_classes_js_1.ProtectorateTopbar({ name: "Designate Officer", topbarType: "special", slot: 4, cooldown: 120, energyCost: 5, energyType: "topbar", description: "Designated officer gains +3 ranks and is healed. When it kills an enemy unit, nearby allied units are inspired and gain +50% attack speed for 5s.", requiredLevel: 7, parentId: this.id, parentUUID: this.uuid, }); this.commanderTopbars.transport = new protectorate_classes_js_1.ProtectorateTopbar({ name: "Transport", topbarType: "special", slot: 5, energyCost: 10, energyType: "topbar", cooldown: 60, description: "Quickly transport your and allied units. Units will be healed for 100 HP.", requiredLevel: 9, parentId: this.id, parentUUID: this.uuid, }); // Kawaii commander levels with proper Mera naming! (◕‿◕)♡ this.levels["1"] = new commander_level_js_1.CommanderLevel({ level: 1, description: "Mera is a frontline hero. She gains topbar power faster.", unlocks: ["shockwave", "reinforcements"], parentId: this.id, uuid: "14feba4d-dcce-445f-b6be-a72720eb4e33", }); this.levels["2"] = new commander_level_js_1.CommanderLevel({ level: 2, description: "Mera's Dash deals double damage, and Mera recharges shield after dashing", parentId: this.id, uuid: "30102a15-901d-44a8-ac96-8576ece287b3", }); this.levels["3"] = new commander_level_js_1.CommanderLevel({ level: 3, description: "New Topbar Ability: Airstrike targeted location.", unlocks: ["airstrike", coop_mera_airstrip_js_1.default.id], parentId: this.id, uuid: "f0bbd9bb-8d12-4e89-a337-96cf8285e813", }); this.levels["4"] = new commander_level_js_1.CommanderLevel({ level: 4, description: "Units gain +15% move speed and +15% attack range", parentId: this.id, uuid: "2afad1aa-f38d-4994-b8e9-4d546916f944", }); this.levels["5"] = new commander_level_js_1.CommanderLevel({ level: 5, description: "+50% faster production.", unlocks: [coop_mera_ironwing_js_1.default.id], parentId: this.id, uuid: "c204a800-d38f-4b57-aab9-7820516ae411", }); this.levels["6"] = new commander_level_js_1.CommanderLevel({ level: 6, description: "Mera avoids a killing blow every 90s. Her health is fully restored and enemies are thrown away.", parentId: this.id, uuid: "9341c15c-bc1b-4735-a6ad-263a8ae92696", }); this.levels["7"] = new commander_level_js_1.CommanderLevel({ level: 7, description: "New Topbar Ability: Targeted unit gains +3 ranks and heals. When it kills an enemy unit, nearby allied units gain +50% attack speed for 5s.", unlocks: ["designate-officer"], parentId: this.id, uuid: "32c43563-b7fe-4995-915a-73881e15d60b", }); this.levels["8"] = new commander_level_js_1.CommanderLevel({ level: 8, description: "Unit flux cost reduced by 25.", unlocks: [coop_mera_cyclops_js_1.default.id, coop_mera_strider_js_1.default.id], parentId: this.id, uuid: "2d91df52-24b1-4a33-9e80-c179efeaea57", }); this.levels["9"] = new commander_level_js_1.CommanderLevel({ level: 9, description: "New Topbar Ability: Transport units to target location. Units are healed for 100 HP.", unlocks: ["transport"], parentId: this.id, uuid: "e10c11be-2f1c-4970-a853-0107919848af", }); this.levels["10"] = new commander_level_js_1.CommanderLevel({ level: 10, description: "Attacking enemy units reduces Aegis Shield cooldown by 1s per hit. Hitting enemies with Dash ability counts.", parentId: this.id, uuid: "e3ac06d8-0306-45f8-92ad-71fee6e8b682", }); this.levels["11"] = new commander_level_js_1.CommanderLevel({ level: 11, description: "Reinforcements is no longer limited to locations around Operating Towers", parentId: this.id, uuid: "6121479c-b34f-45e3-9ba6-13c6dbd6b707", }); this.levels["12"] = new commander_level_js_1.CommanderLevel({ level: 12, description: "Units can reach rank 4 veterancy and gain veterancy 50% faster. Allies can reach rank 1.", parentId: this.id, uuid: "988a8fb4-b146-43eb-b3eb-bfdf2b269b06", }); // Children auto-populated by CoopCommanderUnit base class - kawaii automation! (◕‿◕)♡ } } exports.MeraCoop = MeraCoop; // Static property for source path MeraCoop.src = "src/zerospace/coop/commander/mera-commander.ts"; exports.default = MeraCoop; //# sourceMappingURL=mera-commander.js.map