ZeroSpace.gg

Loi'Kru

Chakru Hero Unit

import { ChakruHeroUnit } from "../../../../defaults/chakru.js"; import { Attack, Spell, SpellModeSwitch } from "../../../../engine/ability.js"; class LoiKru extends ChakruHeroUnit { override uuid: string; static override src = "src/zerospace/mercenary/chakru/hero/loikru.ts"; constructor() { super(); this.name = "Loi'Kru"; this.description = "Melee hero who transforms between a shielding Earth form and Healing water form."; this.buildTime = 5; this.hotkey = ""; this.uuid = "9cc9a8dd-c47f-4534-9e09-25636685c21f"; this.internalId = "Troop_MP_ChakruHero_C"; this.internalTags = [ "Attackable.Unit.Hero", "Logic.SpawnAtOldestSpawner", "Attackable.Biological", "Logic.NoVeterancy", ]; this.internalSecondaryTags = ["Infantry"]; this.vision = 1800; this.turnSpeed = 6000; this.pushability = 0.1; this.healthRegen = 12; this.hp = 300; this.shields = 0; this.armor = 0; this.armorType = "hero"; this.speed = 500; this.stunResist = 60; // Mode-specific stats have nowhere to live yet — modes carry a name and description, not stat // deltas. As of 2026-07-30 Water form grants +20% move speed (was +25%). this.modes = [ { slug: "water", name: "Water", description: "Gains Water abilities and +2 health regeneration." }, { slug: "earth", name: "Earth", description: "Gains Earth abilities and +1 armor." }, ]; this.attacks.leviathanSlash = new Attack({ internalId: "Default__Weapon_Chakru_MP_ChakruHero_Water_C", name: "Leviathan Slash", damage: 20, range: 200, cooldown: 1.4, armorPenetration: 0, delay: 0.18, targets: ["ground"], parentId: this.id, parentUUID: this.uuid, }); this.spellModes.transform = new SpellModeSwitch({ name: "Transform", description: "Transforms between Earth and Water forms with different abilities. \nEarth form has +1 armor. \nWater form has +2 health regeneration.", hotkey: "E", switchBetween: ["water", "earth"], parentId: this.id, parentUUID: this.uuid, }); this.spells.torrent = new Spell({ name: "Torrent", description: "Shoots a burst of water at a target unit, dealing 75 damage and knocking it back. \nIf cast on an allied unit, heals instead of damages.", cooldown: 12, targets: ["ground", "air"], hotkey: "Q", requiresMode: "water", parentId: this.id, parentUUID: this.uuid, }); this.spells.healingWave = new Spell({ name: "Healing Wave", description: "Create a wave in target direction, knocking back enemies, and healing allies for 50 health.", cooldown: 15, hotkey: "W", targets: ["map"], targetMode: "strip", requiresMode: "water", parentId: this.id, parentUUID: this.uuid, }); this.spells.earthShield = new Spell({ name: "Earth Shield", // FUTURE-FEATURE: BUFFS — `targets` below is who may receive the shield. The 50 damage it // deals to ground enemies when it breaks is an effect on expiry with its own targeting, and // only exists in the description. description: "Give the target unit a shield which absrbs up to 50 damage. \nShield deals 50 damage to ground enemies when broken. Lasts 10 seconds.", duration: 10, cooldown: 15, hotkey: "Q", targets: ["ground", "air"], requiresMode: "earth", parentId: this.id, parentUUID: this.uuid, }); this.spells.boulder = new Spell({ name: "Boulder", description: "Gather nearby allies and roll towards a target direction. \nStops upon impact with an enemy unit, stunning the struck unit for 2 seconds and dealing 75 damage", requiresMode: "earth", cooldown: 15, hotkey: "W", targets: ["map"], targetMode: "strip", parentId: this.id, parentUUID: this.uuid, }); } } export default LoiKru;