UNPKG

@zerospacegg/iolin

Version:

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

110 lines 4.02 kB
/** * Man-Eater - Grell underground predator with splash damage and burrow abilities * Medium armor, devastating splash attacks, and terrain-bypassing burrow mechanics */ import { Attack, Spell, Upgrade } from "../../../../engine/ability.js"; import { GrellArmyUnit } from "../../grell-classes.js"; import AdvancedAugmentationPool from "../building/advanced-augmentation-pool.js"; import MediumIncubator from "../building/medium-incubator.js"; export class ManEater extends GrellArmyUnit { constructor() { super(); this.name = "Man-Eater"; this.tier = "T2"; this.hotkey = "Y"; this.hexiteCost = 125; this.fluxCost = 25; this.buildTime = 36; this.buildCount = 1; this.uuid = "9e8afeef-ffcd-496e-af8b-155219ef61c0"; this.unlockedBy = [MediumIncubator.id]; this.createdBy = [MediumIncubator.id]; this.upgradedBy = [AdvancedAugmentationPool.id]; // Capture instance for upgrade apply methods const unit = this; this.hp = 450; this.shields = 0; this.armor = 1; this.armorType = "medium"; this.speed = 560; this.supply = 4; this.description = "Short range unit with area damage and bonus against light units. Attacks ground units."; this.attacks.attack = new Attack({ name: "Attack", damage: 30, range: 350, cooldown: 1.78, targets: ["ground"], bonusDamage: [{ multiplier: 2.0, vs: ["armor:light"] }], splash: { multiplier: 1.0, range: 125 }, parentId: this.id, parentUUID: this.uuid, }); this.spells.burrow = new Spell({ name: "Burrow", description: "Burrows to the target point, bypassing any terrain", range: 1400, cooldown: 20, delay: 1, targets: ["ground"], unlocked: false, parentId: this.id, parentUUID: this.uuid, }); this.upgrades.chitinousCarapace = new Upgrade({ name: "Chitinous Carapace", description: "+20% damage mitigation", tier: "T2.5", fluxCost: 100, researchTime: 50, apply() { unit.hp = (unit.hp || 0) * 1.25; unit.armor = (unit.armor || 0) + 1; }, parentId: this.id, parentUUID: this.uuid, }); this.upgrades.burrow = new Upgrade({ name: "Burrow", description: "Unlocks the Burrow ability: Burrows to the target point, bypassing any terrain", tier: "T2.5", fluxCost: 50, researchTime: 30, apply() { unit.spells.burrow.unlocked = true; }, parentId: this.id, parentUUID: this.uuid, }); this.upgrades.wideBeetleBite = new Upgrade({ name: "Wide Beetle Bite", description: "+50% splash radius", tier: "T3.5", fluxCost: 125, researchTime: 60, apply() { if (unit.attacks.attack.splash) { unit.attacks.attack.splash.range = (unit.attacks.attack.splash.range || 0) * 1.5; } }, parentId: this.id, parentUUID: this.uuid, }); this.upgrades.bloodlust = new Upgrade({ name: "Bloodlust", description: "+20% attack speed per kill (max 100%)", tier: "T3.5", fluxCost: 125, researchTime: 60, apply() { // Implementation handled by game engine for kill stacking bonuses }, parentId: this.id, parentUUID: this.uuid, }); } } // Static property for source path ManEater.src = "src/zerospace/faction/grell/unit/man-eater.ts"; export default ManEater; //# sourceMappingURL=man-eater.js.map