UNPKG

@zerospacegg/iolin

Version:

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

254 lines 13.4 kB
"use strict"; /** * Vynthra - Grell Coop Commander * Bio-symbiotic commander with PKL-accurate abilities and topbar system */ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.VynthraCoop = exports.GrellCoopCommander = 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 grell_classes_js_1 = require("../../faction/grell-classes.cjs"); // Import all Grell COOP units and buildings for safe ID references const coop_vynthra_advanced_augmentation_pool_js_1 = __importDefault(require("./vynthra/building/coop-vynthra-advanced-augmentation-pool.cjs")); const coop_vynthra_augmentation_pool_js_1 = __importDefault(require("./vynthra/building/coop-vynthra-augmentation-pool.cjs")); const coop_vynthra_grell_extractor_js_1 = __importDefault(require("./vynthra/building/coop-vynthra-grell-extractor.cjs")); const coop_vynthra_incubator_js_1 = __importDefault(require("./vynthra/building/coop-vynthra-incubator.cjs")); const coop_vynthra_large_incubator_js_1 = __importDefault(require("./vynthra/building/coop-vynthra-large-incubator.cjs")); const coop_vynthra_medium_incubator_js_1 = __importDefault(require("./vynthra/building/coop-vynthra-medium-incubator.cjs")); const coop_vynthra_nourishing_pod_js_1 = __importDefault(require("./vynthra/building/coop-vynthra-nourishing-pod.cjs")); const coop_vynthra_root_colony_js_1 = __importDefault(require("./vynthra/building/coop-vynthra-root-colony.cjs")); const coop_vynthra_skrelling_nest_js_1 = __importDefault(require("./vynthra/building/coop-vynthra-skrelling-nest.cjs")); const coop_vynthra_special_augmentation_pool_js_1 = __importDefault(require("./vynthra/building/coop-vynthra-special-augmentation-pool.cjs")); const coop_vynthra_behemoth_js_1 = __importDefault(require("./vynthra/unit/coop-vynthra-behemoth.cjs")); const coop_vynthra_harbinger_js_1 = __importDefault(require("./vynthra/unit/coop-vynthra-harbinger.cjs")); const coop_vynthra_lasher_js_1 = __importDefault(require("./vynthra/unit/coop-vynthra-lasher.cjs")); const coop_vynthra_man_eater_js_1 = __importDefault(require("./vynthra/unit/coop-vynthra-man-eater.cjs")); const coop_vynthra_reaver_js_1 = __importDefault(require("./vynthra/unit/coop-vynthra-reaver.cjs")); const coop_vynthra_stinger_js_1 = __importDefault(require("./vynthra/unit/coop-vynthra-stinger.cjs")); const coop_vynthra_thresher_js_1 = __importDefault(require("./vynthra/unit/coop-vynthra-thresher.cjs")); const coop_vynthra_weaver_js_1 = __importDefault(require("./vynthra/unit/coop-vynthra-weaver.cjs")); // Create a Grell-specific coop commander class class GrellCoopCommander extends unit_js_1.CoopCommanderUnit { constructor() { super(); // Note: uuid and name are abstract properties and should be handled by the concrete class this.commanderType = "support"; this.maxLevel = 12; this.commanderFaction = [ coop_vynthra_grell_extractor_js_1.default.id, coop_vynthra_nourishing_pod_js_1.default.id, coop_vynthra_root_colony_js_1.default.id, coop_vynthra_incubator_js_1.default.id, coop_vynthra_large_incubator_js_1.default.id, coop_vynthra_medium_incubator_js_1.default.id, coop_vynthra_augmentation_pool_js_1.default.id, coop_vynthra_advanced_augmentation_pool_js_1.default.id, coop_vynthra_special_augmentation_pool_js_1.default.id, coop_vynthra_skrelling_nest_js_1.default.id, ]; } /** 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.GrellCoopCommander = GrellCoopCommander; class VynthraCoop extends GrellCoopCommander { get infuseCost() { return 16; } constructor() { super(); this.uuid = "85521f4e-b720-4266-9d69-6d774f94becd"; this.name = "Vynthra (Commander)"; this.commanderType = "support"; this.maxLevel = 12; this.commanderFaction = [ coop_vynthra_grell_extractor_js_1.default.id, coop_vynthra_nourishing_pod_js_1.default.id, coop_vynthra_root_colony_js_1.default.id, coop_vynthra_incubator_js_1.default.id, coop_vynthra_medium_incubator_js_1.default.id, coop_vynthra_large_incubator_js_1.default.id, coop_vynthra_augmentation_pool_js_1.default.id, coop_vynthra_advanced_augmentation_pool_js_1.default.id, coop_vynthra_special_augmentation_pool_js_1.default.id, coop_vynthra_skrelling_nest_js_1.default.id, ]; this.faction = "grell"; this.factionName = "Grell"; this.hp = 600; this.speed = 575; this.currentLevel = 1; // Primary attack from PKL this.attacks.attack = new ability_js_1.Attack({ name: "Attack", damage: 30, cooldown: 1.8, range: 1200, targets: ["air", "ground"], parentId: this.id, parentUUID: this.uuid, }); // Channel ability from PKL this.spells.channel = new ability_js_1.Spell({ name: "Channel", hotkey: "Q", targets: ["air", "ground"], description: "Drain enemy health, slowing them and making them vulnerable to attack. 40/60/80% slow and bonus dmg based on Infusion level. OR Heal allies and make them attack faster. +50/75/100% attack speed based on Infusion level.", parentId: this.id, parentUUID: this.uuid, }); // Thorny Shield ability from PKL this.spells.thornyShield = new ability_js_1.Spell({ name: "Thorny Shield", hotkey: "W", cooldown: 60, description: "The target unit is protected by thorns, takes 50% less damage, and returns 0/5/10 dmg based on infusion level.", parentId: this.id, parentUUID: this.uuid, }); this.commanderTopbars.infusion = new grell_classes_js_1.GrellTopbar({ name: "Infusion", topbarType: "special", slot: 1, description: "Increases health, attack damage, and regeneration of a friendly unit. After acquring the double infusion talent, may be infused a second time. Double infusion bonuses: Hero/Basic unit attacks apply spores that slow enemy units and explode on death. T2 units attacks cause enemies to spawn stingers on death. T3 units do splash damave and stun every 7s.", requiredLevel: 1, parentId: this.id, parentUUID: this.uuid, }); this.commanderTopbars.doubleInfusion = new grell_classes_js_1.GrellTopbar({ name: "Double Infusion", topbarType: "special", slot: 1, description: "Units may be infused a second time. Double infusion bonuses: Hero/Basic unit attacks apply spores that slow enemy units and explode on death. T2 units attacks cause enemies to spawn stingers on death. T3 units do splash damave and stun every 7s.", requiredLevel: 6, parentId: this.id, parentUUID: this.uuid, }); this.commanderTopbars.nourishingPod = new grell_classes_js_1.GrellTopbar({ name: "Nourishing Pod", topbarType: "summon", slot: 2, charges: 5, cooldown: 60, description: "Spawns a free nourishing pod and 3 seedlings anywhere you have vision", requiredLevel: 3, parentId: this.id, parentUUID: this.uuid, }); this.commanderTopbars.treeOfLife = new grell_classes_js_1.GrellTopbar({ name: "Tree of Life", topbarType: "ultimate", slot: 3, cooldown: 360, description: "Spawns a tree of life that heals nearby units and revives nearby dead units.", requiredLevel: 11, parentId: this.id, parentUUID: this.uuid, }); // Kawaii commander levels with proper Vynthra naming! (◕‿◕)♡ this.levels["1"] = new commander_level_js_1.CommanderLevel({ level: 1, description: "Vynthra is a support hero. Infusion Essence can be used on heroes.", unlocks: ["infusion", coop_vynthra_stinger_js_1.default.id, coop_vynthra_lasher_js_1.default.id, coop_vynthra_harbinger_js_1.default.id, coop_vynthra_man_eater_js_1.default.id, coop_vynthra_behemoth_js_1.default.id], parentId: this.id, uuid: "1d79e988-0baf-4145-909f-5ba5d66700a1", }); this.levels["2"] = new commander_level_js_1.CommanderLevel({ level: 2, description: "+200 Range for infused ranged units. +20% health for infused melee units.", parentId: this.id, uuid: "b56f5d5a-5ec5-4cb4-9c7e-438b7071d6df", }); this.levels["3"] = new commander_level_js_1.CommanderLevel({ level: 3, description: "New Topbar Ability: Spawn a Nourishing Pod and three seedlings anywhere you have vision. Cooldown: 60s. Charges: 5.", unlocks: [coop_vynthra_nourishing_pod_js_1.default.id], parentId: this.id, uuid: "d63edb28-1b08-4556-b25e-b39670f60425", }); this.levels["4"] = new commander_level_js_1.CommanderLevel({ level: 4, description: "+15% movement speed", unlocks: [coop_vynthra_thresher_js_1.default.id], parentId: this.id, uuid: "26042924-8e1c-42c8-a1fa-0295840c64d6", }); this.levels["5"] = new commander_level_js_1.CommanderLevel({ level: 5, description: "Units on biomass take 25% less damage", parentId: this.id, uuid: "3db8e20b-ade0-43cb-b814-8b9253a97cfc", }); this.levels["6"] = new commander_level_js_1.CommanderLevel({ level: 6, description: "Units can be infused twice. Vynthra's units gain special bonuses on attack after the second infusion. Bonuses are different based on where they are produced -- slowing and exploding spores, spawning stingers, or dealing splash damage and stun", unlocks: ["double-infusion"], parentId: this.id, uuid: "a01a2fd1-444c-47e4-843c-03ba222c393e", }); this.levels["7"] = new commander_level_js_1.CommanderLevel({ level: 7, description: "-50% unit research cost and time", unlocks: [coop_vynthra_weaver_js_1.default.id, coop_vynthra_reaver_js_1.default.id], parentId: this.id, uuid: "dcceed18-95cb-477e-aebf-3b630d33e429", }); this.levels["8"] = new commander_level_js_1.CommanderLevel({ level: 8, description: "New Unit Ability for all units: Lose 25% health and gain +50% attack and +30% movement speed for 20s.", parentId: this.id, uuid: "7e9f96e1-090b-47f3-8def-47c9c5d43251", }); this.levels["9"] = new commander_level_js_1.CommanderLevel({ level: 9, description: "cultivators attack faster, deal splash damage, and slow enemies", parentId: this.id, uuid: "76a4db37-f493-428e-be43-aee130e3c735", }); this.levels["10"] = new commander_level_js_1.CommanderLevel({ level: 10, description: "4x faster infuse. +40% attack and move speed for 15s.", parentId: this.id, uuid: "13cb87ad-ad9b-42d5-a33f-28dc3e2f65ff", }); this.levels["11"] = new commander_level_js_1.CommanderLevel({ level: 11, description: "New Topbar Ability: Spawn a Tree of Life that heals nearby units and revives nearby dead units. Cooldown: 360s.", unlocks: ["tree-of-life"], parentId: this.id, uuid: "3fe2aca4-326d-47d5-94d0-d7dc8cb79687", }); this.levels["12"] = new commander_level_js_1.CommanderLevel({ level: 12, description: "+15% Lifesteal for infused units", parentId: this.id, uuid: "6e1a824b-954b-4fb5-ae89-f6fa875bf12c", }); // Children auto-populated by CoopCommanderUnit base class - kawaii automation! (◕‿◕)♡ // All other stats inherited from base CoopCommanderUnit class } } exports.VynthraCoop = VynthraCoop; VynthraCoop.src = "src/zerospace/coop/commander/vynthra-commander.ts"; exports.default = VynthraCoop; //# sourceMappingURL=vynthra-commander.js.map