UNPKG

@zerospacegg/iolin

Version:

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

105 lines 3.7 kB
/** * Lasher - Ranged combat unit. Attacks ground and air units. * Light armor, high mobility, long-range attacks with stealth potential */ import { Attack, Spell, Upgrade } from "../../../../engine/ability.js"; import { GrellArmyUnit } from "../../grell-classes.js"; import AugmentationPool from "../building/augmentation-pool.js"; import Incubator from "../building/incubator.js"; export class Lasher extends GrellArmyUnit { constructor() { super(); this.name = "Lasher"; this.tier = "T1.5"; this.hotkey = "R"; this.hexiteCost = 50; this.fluxCost = 25; this.buildTime = 20; this.buildCount = 1; this.uuid = "6c1ec0c5-af3f-4bb1-867f-bd16792d2de6"; this.unlockedBy = [AugmentationPool.id]; this.createdBy = [Incubator.id]; this.upgradedBy = [AugmentationPool.id]; // Capture instance for upgrade apply methods const unit = this; this.hp = 150; this.shields = 0; this.armor = 0; this.armorType = "light"; this.speed = 500; this.supply = 2; this.description = "Ranged combat unit. Attacks ground and air units."; this.attacks.attack = new Attack({ name: "Attack", damage: 20, range: 775, cooldown: 1.1, targets: ["air", "ground"], parentId: this.id, parentUUID: this.uuid, }); this.spells.camouflage = new Spell({ name: "Camouflage", description: "Grants invisibility and +75% movement speed for 3s", hotkey: "X", cooldown: 20, duration: 3, unlocked: false, parentId: this.id, parentUUID: this.uuid, }); this.upgrades.attackRange = new Upgrade({ name: "Attack Range", description: "Increase lasher attack range by 200", tier: "T1.5", fluxCost: 100, researchTime: 50, apply() { unit.attacks.attack.range = (unit.attacks.attack.range || 0) + 200; }, parentId: this.id, parentUUID: this.uuid, }); this.upgrades.fastLegs = new Upgrade({ name: "Fast Legs", description: "Increase lasher movement speed by 25%", tier: "T1.5", fluxCost: 100, researchTime: 50, apply() { unit.speed = (unit.speed || 0) * 1.25; }, parentId: this.id, parentUUID: this.uuid, }); this.upgrades.corrosiveShots = new Upgrade({ name: "Corrosive Shots", description: "+50% damage against heavy armor", tier: "T2.5", fluxCost: 100, researchTime: 50, apply() { unit.attacks.attack.bonusDamage = [{ multiplier: 1.5, vs: ["heavy"] }]; }, parentId: this.id, parentUUID: this.uuid, }); this.upgrades.camouflage = new Upgrade({ name: "Camouflage", description: "Unlocks the Camouflage ability (+25% movement speed and cloak for 6s)", tier: "T3.5", fluxCost: 150, researchTime: 60, apply() { unit.spells.camouflage.unlocked = true; unit.spells.camouflage.duration = 6; }, parentId: this.id, parentUUID: this.uuid, }); } } // Static property for source path Lasher.src = "src/zerospace/faction/grell/unit/lasher.ts"; export default Lasher; //# sourceMappingURL=lasher.js.map