UNPKG

@zerospacegg/iolin

Version:

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

122 lines 4.88 kB
"use strict"; /** * Stinger - A fast small melee unit. Attacks deal additional damage over time. Attacks ground units. * Light armor, high speed, vicious claw attacks with upgrade potential */ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const ability_js_1 = require("../../../../engine/ability.cjs"); const grell_classes_js_1 = require("../../grell-classes.cjs"); const augmentation_pool_js_1 = __importDefault(require("../building/augmentation-pool.cjs")); const incubator_js_1 = __importDefault(require("../building/incubator.cjs")); class Stinger extends grell_classes_js_1.GrellArmyUnit { constructor() { super(); this.name = "Stinger"; this.tier = "T1"; this.hotkey = "Q"; this.hexiteCost = 50; this.fluxCost = 0; this.buildTime = 18; this.buildCount = 2; this.uuid = "234bc62d-ee5e-4033-ab5c-73abd6ae9947"; // Mutable properties (can be modified by upgrades) this.hp = 90; this.shields = 0; this.armor = 0; this.armorType = "light"; this.speed = 700; this.supply = 1; this.description = "A fast small melee unit. Attacks deal additional damage over time. Attacks ground units."; this.createdBy = [incubator_js_1.default.id]; this.unlockedBy = [incubator_js_1.default.id]; this.upgradedBy = [augmentation_pool_js_1.default.id]; // Capture stinger instance for upgrade apply methods const stinger = this; // Primary attack - Claws this.attacks.claws = new ability_js_1.Attack({ name: "Claws", damage: 6, range: 100, cooldown: 0.65, delay: 0.06, targets: ["ground"], parentId: this.id, parentUUID: this.uuid, }); // Stealth passive (unlocked by Raptor upgrade) this.passives.stealth = new ability_js_1.Passive({ name: "Stealth", description: "On friendly biomass gain stealth and +50% attack speed", unlocked: false, parentId: this.id, parentUUID: this.uuid, }); // Poison passive (unlocked by Poison Sting upgrade) this.passives.poison = new ability_js_1.Passive({ name: "Poison", description: "Attacks deal 6 dps and slows move speed by 25%. Lasts for 5 seconds.", unlocked: false, parentId: this.id, parentUUID: this.uuid, }); // Biomass healing passive inherited automatically from GrellArmyUnit // Upgrades this.upgrades.fastLegs = new ability_js_1.Upgrade({ name: "Fast Legs", description: "Increase Stinger movement speed by 30%", tier: "T1.5", fluxCost: 70, researchTime: 40, apply: () => { stinger.speed = (stinger.speed || 0) * 1.3; // 700 * 1.3 = 910 }, parentId: this.id, parentUUID: this.uuid, }); this.upgrades.poisonSting = new ability_js_1.Upgrade({ name: "Poison Sting", description: "Attacks deal 6 dps and slows move speed by 25%. Lasts for 5 seconds.", tier: "T3.5", fluxCost: 125, researchTime: 60, apply: () => { stinger.passives.poison.unlocked = true; }, parentId: this.id, parentUUID: this.uuid, }); this.upgrades.raptor = new ability_js_1.Upgrade({ name: "Raptor", description: "On friendly biomass gain stealth and +50% attack speed", tier: "T2.5", fluxCost: 100, researchTime: 45, apply: () => { stinger.passives.stealth.unlocked = true; // Note: +50% attack speed boost applies conditionally on friendly biomass gain }, parentId: this.id, parentUUID: this.uuid, }); this.upgrades.cliffJumping = new ability_js_1.Upgrade({ name: "Cliff Jumping", description: "Stingers can jump up and down normal cliffs. +20% movement speed.", tier: "T2.5", fluxCost: 100, researchTime: 45, apply: () => { stinger.speed = (stinger.speed || 0) * 1.2; // +20% movement speed stinger._addTags("jump:up", "jump:down"); }, parentId: this.id, parentUUID: this.uuid, }); } } // Static property for source path Stinger.src = "src/zerospace/faction/grell/unit/stinger.ts"; exports.default = Stinger; //# sourceMappingURL=stinger.js.map