UNPKG

@zerospacegg/iolin

Version:

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

96 lines 3.77 kB
"use strict"; /** * Skrelling - Grell swarm flyer with anti-air specialization and kamikaze abilities * Light armor, high speed, anti-air focus with suicide attack potential */ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.Skrelling = void 0; const ability_js_1 = require("../../../../engine/ability.cjs"); const grell_classes_js_1 = require("../../grell-classes.cjs"); const incubator_js_1 = __importDefault(require("../building/incubator.cjs")); const skrelling_nest_js_1 = __importDefault(require("../building/skrelling-nest.cjs")); class Skrelling extends grell_classes_js_1.GrellArmyUnit { constructor() { super(); this.name = "Skrelling"; this.tier = "T2.5"; this.hotkey = "T"; this.hexiteCost = 50; this.fluxCost = 100; this.buildTime = 16; this.buildCount = 4; this.uuid = "06475a6d-672c-4d64-a876-c22686ea3535"; this.unlockedBy = [skrelling_nest_js_1.default.id]; this.createdBy = [incubator_js_1.default.id]; this.upgradedBy = [skrelling_nest_js_1.default.id]; // Capture instance for upgrade apply methods const unit = this; this.hp = 60; this.shields = 0; this.armor = 0; this.armorType = "light"; this.speed = 800; this.supply = 1; this.description = "Light skirmish flier which poisons enemies on attack. Attacks ground units."; // domain = "air" is readonly, use Object.assign Object.assign(this, { domain: "air" }); this.attacks.attack = new ability_js_1.Attack({ name: "Attack", damage: 5, range: 200, cooldown: 1, targets: ["air", "ground"], bonusDamage: [ { multiplier: 2.0, vs: ["flyer"] }, { multiplier: 2.0, vs: ["unit:harvester"] }, ], parentId: this.id, parentUUID: this.uuid, }); this.passives.suicide = new ability_js_1.Passive({ name: "Suicide", description: "Suicide itself on enemy air units dealing 200 damage +50 damage to nearby units (25% splash)", hotkey: "K", damage: 200, targets: ["air"], splash: { multiplier: 0.25, range: 125 }, unlocked: false, parentId: this.id, parentUUID: this.uuid, }); this.upgrades.airBonus = new ability_js_1.Upgrade({ name: "Air Bonus", description: "Increase bonus damage vs air by 100%", tier: "T2.5", fluxCost: 100, researchTime: 50, apply() { if (unit.attacks.attack.bonusDamage && unit.attacks.attack.bonusDamage[0]) { unit.attacks.attack.bonusDamage[0].multiplier = 3.0; } }, parentId: this.id, parentUUID: this.uuid, }); this.upgrades.suicide = new ability_js_1.Upgrade({ name: "Suicide", description: "Suicide itself on enemy air units dealing 200 damage +50 damage to nearby units (25% splash)", tier: "T3.5", fluxCost: 100, researchTime: 50, apply() { unit.passives.suicide.unlocked = true; }, parentId: this.id, parentUUID: this.uuid, }); } } exports.Skrelling = Skrelling; // Static property for source path Skrelling.src = "src/zerospace/faction/grell/unit/skrelling.ts"; exports.default = Skrelling; //# sourceMappingURL=skrelling.js.map