ZeroSpace.gg

Resonator

Xol Special Building

import { XolSpecialBuilding } from "../../../../defaults/xol.js"; import { Attack, Heal, Passive, SpellModeSwitch } from "../../../../engine/ability.js"; export class Resonator extends XolSpecialBuilding { override uuid: string; static override src = "src/zerospace/faction/xol/building/resonator.ts"; constructor() { super(); this.name = "Resonator"; this.description = "Transformable defensive structure:\n\n+ Roller - Laser weapon attacking ground and air\n+ Spectron - Area effect projectile weapon\n+ Xyther - Heals all around\n+ Scouting Drone - Increased vision and detects enemies in a wide radius"; this.tier = ""; this.hotkey = "E"; this.uuid = "0c2560fd-f973-4af0-a9b4-0223f1637884"; this.hexiteCost = 200; this.fluxCost = 0; this.buildTime = 22; this.buildCount = 1; this.hp = 600; this.armor = 1; this.armorType = "building"; this.range = 1600; // Xol unit-merge relationships (pending structured merge-input support): Roller, Xyther, // Spectron, or Scouting Drone can merge into the Resonator; Unmerge returns the input unit. this.modes = [ { slug: "unmerged", name: "Unmerged", description: "Has not merged with a Xol unit." }, { slug: "roller", name: "Roller", description: "Merged with a Roller; gains a heavy laser weapon." }, { slug: "xyther", name: "Xyther", description: "Merged with a Xyther; heals nearby allies." }, { slug: "spectron", name: "Spectron", description: "Merged with a Spectron; gains a long-range area weapon." }, { slug: "scouting-drone", name: "Scouting Drone", description: "Merged with a Scouting Drone; gains detection and increased vision.", }, ]; this.attacks.primary = new Attack({ name: "Attack", damage: 20, cooldown: 0.7, range: 1600, targets: ["ground", "air"], requiresMode: ["unmerged", "xyther", "scouting-drone"], parentId: this.id, parentUUID: this.uuid, }); this.spellModes.unmerge = new SpellModeSwitch({ name: "Unmerge", hotkey: "U", description: "Unmerges the Resonator from its merged Xol unit and returns to Unmerged mode.", cooldown: 0.2, requiresMode: ["roller", "xyther", "spectron", "scouting-drone"], switchBetween: ["roller", "xyther", "spectron", "scouting-drone", "unmerged"], parentId: this.id, parentUUID: this.uuid, }); this.attacks.roller = new Attack({ name: "Attack (Roller)", damage: 50, cooldown: 1.5, range: 1600, targets: ["ground", "air"], bonusDamage: [{ multiplier: 1.5, vs: ["armor:heavy"] }], requiresMode: "roller", parentId: this.id, parentUUID: this.uuid, }); this.heals.xyther = new Heal({ name: "Heal (Xyther)", healing: 16, cooldown: 1, range: 1500, targets: ["friendly:ground", "friendly:air"], requiresMode: "xyther", parentId: this.id, parentUUID: this.uuid, }); this.attacks.spectron = new Attack({ name: "Attack (Spectron)", damage: 60, cooldown: 3, range: 2000, splash: { multiplier: 1, range: 250 }, targets: ["ground", "air"], requiresMode: "spectron", parentId: this.id, parentUUID: this.uuid, }); this.passives.detection = new Passive({ name: "Detection (Scouting Drone)", description: "Provides cloak detection and increases the Resonator's vision to 21 range.", requiresMode: "scouting-drone", parentId: this.id, parentUUID: this.uuid, }); } } export default Resonator;