ZeroSpace.gg

Resonator

Xol Co-Op Special Building

import { XolSpecialBuilding } from "../../../../../defaults/xol.js"; import { Attack, Heal, Passive, SpellModeSwitch } from "../../../../../engine/ability.js"; export class CoopResonator extends XolSpecialBuilding { static override src = "src/zerospace/coop/commander/anrubic/building/coop-anrubic-resonator.ts"; override get variantOf(): string { return "faction/xol/building/resonator"; } 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 = "7e213556-e720-4870-8356-ebe4cd814420"; this.hexiteCost = 150; this.fluxCost = 0; this.buildTime = 22; this.buildCount = 1; this.hp = 600; this.armor = 1; this.armorType = "building"; this.range = 1600; this.unlockedBy = ["faction/xol/building/power-core"]; // 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.attack = 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.attackRoller = 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.healXyther = 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.attackSpectron = 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.detectionScoutingDrone = 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, }); this.modes = this.modes.filter(mode => mode.slug !== "scouting-drone"); this.attacks.attack.requiresMode = ["unmerged", "xyther"]; this.spellModes.unmerge.requiresMode = this.spellModes.unmerge.requiresMode?.filter( mode => mode !== "scouting-drone", ); this.spellModes.unmerge.switchBetween = this.spellModes.unmerge.switchBetween.filter( mode => mode !== "scouting-drone", ); delete this.passives.detectionScoutingDrone; this.unlockedBy = ["coop/commander/anrubic/building/coop-anrubic-power-core"]; } } export default CoopResonator;