ZSGG Public Library
Anrubic (Commander)
Xol Co-Op Commander
import { Attack, Spell, SpellModeSwitch } from "../../../engine/ability.js";
import { CoopCommanderUnit } from "../../../engine/unit.js";
import { CommanderLevel } from "../../../engine/commander-level.js";
import { XolTopbar } from "../../../defaults/xol.js";
export class AnrubicCommander extends CoopCommanderUnit {
static override src = "src/zerospace/coop/commander/anrubic-commander.ts";
constructor() {
super();
this.uuid = "f3e1c8a0-4b2d-4c9e-9f5b-1a2b3c4d5e6f";
this.name = "Anrubic (Commander)";
this.commanderType = "frontline";
this.maxLevel = 13;
this.faction = "xol";
this.factionName = "Xol";
this.modes = [
{ slug: "unmerged", name: "Unmerged", description: "Has not assimilated a Xol unit yet." },
{ slug: "roller", name: "Roller", description: "Last assimilated a Roller; gains its weapon and abilities." },
{ slug: "xyther", name: "Xyther", description: "Last assimilated a Xyther; gains its weapon and abilities." },
{
slug: "spectron",
name: "Spectron",
description: "Last assimilated a Spectron; gains its weapon and abilities.",
},
];
this.hp = 400;
this.shields = 400;
this.armor = 0;
this.armorType = "hero";
this.stunResist = 70;
this.speed = 550;
this.currentLevel = 1;
this.commanderFaction = [
"coop/commander/anrubic/building/coop-anrubic-world-engine",
"coop/commander/anrubic/building/coop-anrubic-power-core",
"coop/commander/anrubic/building/coop-anrubic-gyroforge",
"coop/commander/anrubic/building/coop-anrubic-xyther-assembler",
"coop/commander/anrubic/building/coop-anrubic-spectral-foundry",
"coop/commander/anrubic/building/coop-anrubic-resonator",
"coop/commander/anrubic/building/coop-anrubic-world-forge",
"coop/commander/anrubic/building/coop-anrubic-extractor",
"coop/commander/anrubic/unit/coop-anrubic-xol-harvester",
"coop/commander/anrubic/unit/coop-anrubic-roller",
"coop/commander/anrubic/unit/coop-anrubic-xyther",
"coop/commander/anrubic/unit/coop-anrubic-spectron",
"coop/commander/anrubic/unit/coop-anrubic-echo",
"coop/commander/anrubic/unit/coop-anrubic-defiant",
"coop/commander/anrubic/unit/coop-anrubic-synapse",
"coop/commander/anrubic/unit/coop-anrubic-paradox",
"coop/commander/anrubic/unit/coop-anrubic-cataclyst",
"coop/commander/anrubic/unit/coop-anrubic-havoc",
];
this.attacks.attack = new Attack({
internalId: "Default__Weapon_Xol_MP_XolHero_C",
name: "Morph Blade",
damage: 50,
cooldown: 1.2,
range: 200,
targets: ["ground"],
parentId: this.id,
parentUUID: this.uuid,
splash: {
multiplier: 0.5,
range: 150,
},
requiresMode: "unmerged",
});
this.attacks.sentinelFlare = new Attack({
name: "Sentinel Flare",
damage: 25,
range: 400,
cooldown: 0.4,
targets: ["ground", "air"],
requiresMode: "roller",
parentId: this.id,
parentUUID: this.uuid,
});
this.attacks.nexusRend = new Attack({
name: "Nexus Rend",
damage: 63,
range: 200,
cooldown: 1.2,
splash: { multiplier: 0.5, range: 150 },
targets: ["ground"],
requiresMode: "xyther",
parentId: this.id,
parentUUID: this.uuid,
});
this.attacks.singularityNova = new Attack({
name: "Singularity Nova",
description: "Attack charges up to 50 base damage while not attacking.",
damage: 71,
range: 1000,
cooldown: 1,
bonusDamage: [{ multiplier: 1.25, vs: ["armor:heavy"] }],
targets: ["ground", "air"],
requiresMode: "spectron",
parentId: this.id,
parentUUID: this.uuid,
});
this.spellModes.assimilate = new SpellModeSwitch({
name: "Assimilate",
hotkey: "Q",
cooldown: 12,
targets: ["ground", "air"],
targetMode: "unit",
switchBetween: ["unmerged", "roller", "xyther", "spectron"],
description:
"Assimilate a first tier Xol unit, gaining an ability and vitals based on the target type, healing 50% of the unit's health, and Overclocking the caster. Grapple ability effect is changed based on the hero form.",
parentId: this.id,
parentUUID: this.uuid,
});
this.spells.grapple = new Spell({
name: "Grapple",
hotkey: "W",
cooldown: 10,
targets: ["ground", "air"],
description:
"Pulls to the target, stunning it and dealing 2x weapon damage to the target and any units on the way. Based on current form affects units around the target: \nRoller - 80 damage enemies. \nXyther - Stun enemies for 5 seconds, and restore 100 shields to friendly units. \nSpectron - Slow enemies by 50% and make them vulnerable (+50% damage taken) for a 10 seconds.",
parentId: this.id,
parentUUID: this.uuid,
});
this.spells.throwRollers = new Spell({
name: "Throw Rollers",
cooldown: 60,
hotkey: "E",
targets: ["map"],
targetMode: "location",
requiresMode: "roller",
description:
"Create and throw a Roller to the target location. Deals 30 damage per Roller and slows targets by 50% for 2 seconds. \nHero Ability Upgrade T1: +2 Rollers thrown by the Throw Rollers ability. \nHero Ability Upgrade T2: +2 Rollers thrown by the Throw Rollers ability.",
parentId: this.id,
parentUUID: this.uuid,
});
this.spells.shield = new Spell({
name: "Shield",
cooldown: 90,
hotkey: "E",
targets: ["map"],
targetMode: "location",
requiresMode: "xyther",
description:
"Place down a shield that blocks incoming shots. The shield absorbs 4.5x maximum hero shields. Lasts 30 seconds. \nHero Ability Upgrade T1: The Shield reflects 5 damage. \nHero Ability Upgrade T2: +50% Shield health and duration.",
parentId: this.id,
parentUUID: this.uuid,
});
this.spells.blink = new Spell({
name: "Blink",
cooldown: 60,
hotkey: "E",
targets: ["map"],
targetMode: "location",
requiresMode: "spectron",
description:
"Teleports to the target location. \nHero Ability Upgrade T1: The Blink ability teleports nearby units together with Anrubic. \nHero Ability Upgrade T2: +50% range and radius for the Blink ability.",
parentId: this.id,
parentUUID: this.uuid,
});
this.commanderTopbars.havoc = new XolTopbar({
name: "Havoc",
topbarType: "summon",
slot: 1,
hotkey: "Ctrl-Q",
cooldown: 0,
duration: 0,
description: "Spawn a Havoc at location. It charges through enemies. Explodes on death dealing 300 damage.",
requiredLevel: 1,
parentId: this.id,
parentUUID: this.uuid,
});
this.commanderTopbars.forcedAssimilation = new XolTopbar({
name: "Forced Assimilation",
topbarType: "special",
slot: 2,
hotkey: "Ctrl-W",
cooldown: 180,
duration: 0,
description:
"Target a friendly T1/T2 unit. All nearby friendly T1/T2 units are assimilated, giving 30% of their health, shield and damage to the targeted unit, and an additional 20% if the unit is a T1 unit. Cannot be used on the same unit more than once.",
requiredLevel: 1,
parentId: this.id,
parentUUID: this.uuid,
});
this.commanderTopbars.replicate = new XolTopbar({
name: "Replicate",
topbarType: "summon",
slot: 3,
hotkey: "Ctrl-E",
cooldown: 0,
duration: 0,
description: "Create copies of the targeted friendly units.",
requiredLevel: 2,
parentId: this.id,
parentUUID: this.uuid,
});
this.commanderTopbars.nanoSwarm = new XolTopbar({
name: "Nano Swarm",
topbarType: "ultimate",
slot: 4,
hotkey: "Ctrl-R",
cooldown: 360,
duration: 15,
description:
"Spawn a Nano Swarm at targeted location. It draws enemy fire. After 15 seconds it explodes dealing damage to enemies. The damage increases when it takes damage.",
requiredLevel: 9,
parentId: this.id,
parentUUID: this.uuid,
});
this.levels["1"] = new CommanderLevel({
name: "Anrubic",
level: 1,
description: "Command Anrubic and his Xol.",
parentId: this.id,
uuid: "2177b6dc-52ca-440d-bb95-663b1e553ceb",
});
this.levels["2"] = new CommanderLevel({
name: "Replicate / Efficient Nanoswarms",
level: 2,
description:
"Replicate: Create copies of the targeted friendly units. \nEfficient Nanoswarms: Unit production buildings build faster. \nEfficient Nanoswarms: World forge researches upgrades faster.",
parentId: this.id,
uuid: "44d28b69-0e1f-4fbc-966f-561f9352685e",
});
this.levels["3"] = new CommanderLevel({
name: "Hero Ability Upgrade T1",
level: 3,
description:
"+2 Rollers thrown by the Throw Rollers ability. The Shield reflects 5 damage. The Blink ability teleports nearby units together with Anrubic.",
parentId: this.id,
uuid: "0012048b-3e96-4ca4-9bb9-8f72abbcad93",
});
this.levels["4"] = new CommanderLevel({
name: "Merge",
level: 4,
description: "Enables the ability to merge, which combines units to make new ones.",
parentId: this.id,
uuid: "f311559b-25a8-43bf-88cf-fca49575825b",
unlocks: [
"coop/commander/anrubic/unit/coop-anrubic-echo",
"coop/commander/anrubic/unit/coop-anrubic-defiant",
"coop/commander/anrubic/unit/coop-anrubic-synapse",
],
});
this.levels["5"] = new CommanderLevel({
name: "Defensive Nanoswarms",
level: 5,
description:
"Defensive Nanoswarms: Power Core builds instantly, and has a shield. \nDefensive Nanoswarms: Resonator builds faster, and can hold Tier 2 units for additional upgrades.",
parentId: this.id,
uuid: "de79b1c5-e16d-40f0-aa98-67ce67e62886",
});
this.levels["6"] = new CommanderLevel({
name: "Hero Ability Upgrade T2 / Additional Blueprints",
level: 6,
description:
"Hero Ability Upgrade T2: +2 Rollers thrown by the Throw Rollers ability. +50% Shield health and duration. +50% range and radius for the Blink ability. \nAdditional Blueprints: World forge allows you to research up to 8 upgrades.",
parentId: this.id,
uuid: "c51710e1-e366-42a7-a70f-78de5126a5c0",
});
this.levels["7"] = new CommanderLevel({
name: "Faster Production",
level: 7,
description: "Production structures have increased starting charges, recharge faster and can hold more charges.",
parentId: this.id,
uuid: "71a1c0a9-1a0a-49d8-a090-526e12a4d75c",
});
this.levels["8"] = new CommanderLevel({
name: "Paradox",
level: 8,
description: "A large caster that can manipulate time, offering potentially game-changing effects.",
unlocks: ["coop/commander/anrubic/unit/coop-anrubic-paradox"],
parentId: this.id,
uuid: "e33d4c63-e351-4057-9d71-f241b9c3675b",
});
this.levels["9"] = new CommanderLevel({
name: "Nano Swarm",
level: 9,
description:
"Spawn a Nano Swarm at targeted location. It draws enemy fire. After 15 seconds it explodes dealing damage to enemies. The damage increases when it takes damage.",
parentId: this.id,
uuid: "7c0048df-081f-4267-bf17-5420bd43c2e5",
});
this.levels["10"] = new CommanderLevel({
name: "Upgraded Forced Assimilation",
level: 10,
description:
"Force Assimilate gives a unique bonus for each unit assimilated based on the type of unit: \nRoller: +0.5 health regeneration per second. \nXyther: +2 shield regeneration per second. \nSpectron: +0.25 attack range. \nEcho: +25 movement speed. \nDefiant: +0.25 armour. \nSynapse: +2% attack speed.",
parentId: this.id,
uuid: "4943a2db-f7e2-42a2-9c6c-eeca796a22e0",
});
// Level 11: no unlock yet for this level
this.levels["12"] = new CommanderLevel({
name: "Cataclyst",
level: 12,
description: "Ultimate flying unit with destructive abilities. Limit of 1.",
parentId: this.id,
unlocks: ["coop/commander/anrubic/unit/coop-anrubic-cataclyst"],
uuid: "fbc6e227-59a5-446f-9de6-26dc6310f0b4",
});
this.levels["13"] = new CommanderLevel({
name: "Faction power arsenal slots unlocked",
level: 13,
description:
"Unlocks four faction power slots in the Arsenal and grants you the faction powers items for this commander.",
parentId: this.id,
uuid: "1c4f3e51-4c4c-4744-8c9a-60d02d5b3252",
});
}
}
export default AnrubicCommander;