ZSGG Public Library
Galavax (Commander)
Legion Co-Op Commander
import { LegionTopbar } from "../../../defaults/legion.js";
import { Attack, Spell, SpellModeSwitch, Upgrade } from "../../../engine/ability.js";
import { CommanderLevel } from "../../../engine/commander-level.js";
import { CoopCommanderUnit } from "../../../engine/unit.js";
export class GalavaxCoop extends CoopCommanderUnit {
static override src = "src/zerospace/coop/commander/galavax-commander.ts";
/** Commanders have no build cost, so every one of them is priced by hand. */
override infuseCostOverride = 15;
constructor() {
super();
this.uuid = "d7de6b0b-27df-4bb6-bc13-4f242d9ea83c";
this.name = "Galavax (Commander)";
this.commanderType = "caster";
this.maxLevel = 12;
this.faction = "legion";
this.factionName = "Legion";
this.commanderFaction = [
"coop/commander/galavax/building/coop-galavax-garrison-tower",
"coop/commander/galavax/building/coop-galavax-legion-extractor",
"coop/commander/galavax/building/coop-galavax-idal-conduit",
"coop/commander/galavax/building/coop-galavax-guardian-obelisk",
"coop/commander/galavax/building/coop-galavax-healing-obelisk",
"coop/commander/galavax/building/coop-galavax-legion-barracks",
"coop/commander/galavax/building/coop-galavax-citadel",
"coop/commander/galavax/building/coop-galavax-armory",
"coop/commander/galavax/building/coop-galavax-terror-tower",
"coop/commander/galavax/building/coop-galavax-summoning-obelisk",
"coop/commander/galavax/building/coop-galavax-warp-obelisk",
"coop/commander/galavax/building/coop-galavax-monolith",
"coop/commander/galavax/unit/coop-galavax-thrall",
"coop/commander/galavax/unit/coop-galavax-steelsworn",
"coop/commander/galavax/unit/coop-galavax-dark-disciple",
"coop/commander/galavax/unit/coop-galavax-storm-bringer",
"coop/commander/galavax/unit/coop-galavax-emperor-projection",
"coop/commander/galavax/unit/coop-galavax-terror-tank",
"coop/commander/galavax/unit/coop-galavax-dreadnought",
"coop/commander/galavax/unit/coop-galavax-legion-labourer",
"coop/commander/galavax/unit/coop-galavax-legion-build-drone",
"coop/commander/galavax/unit/coop-galavax-legion-scout-drone",
];
this.hp = 630;
this.armor = 0;
this.speed = 500;
this.modes = [
{
slug: "fire",
name: "Fire",
description: "Uses Fire abilities; weapon attacks set enemies on fire for 15 seconds.",
},
{
slug: "lightning",
name: "Lightning",
description: "Uses Lightning abilities; weapon attacks stun for 3 seconds.",
},
];
this.attacks.ionicSurge = new Attack({
name: "The Emperor's Reach",
damage: 23,
cooldown: 1.4,
range: 1200,
targets: ["ground", "air"],
parentId: this.id,
parentUUID: this.uuid,
});
this.spellModes.elementalShift = new SpellModeSwitch({
name: "Elemental Shift",
hotkey: "E",
switchBetween: ["fire", "lightning"],
description:
"Switch between two elemental modes - changing abilities and weapons. \nLightning: weapon stuns for 3 seconds. \nFire: weapon sets enemies on fire for 15 seconds.",
parentId: this.id,
parentUUID: this.uuid,
});
this.spells.fireball = new Spell({
name: "Fireball",
hotkey: "Q",
cooldown: 30,
targets: ["map"],
targetMode: "strip",
requiresMode: "fire",
description:
"Hurl a fireball that slowly moves across battlefield and burns enemy units and structures. Initial hit deals {Initial} damage, further contact deals {tick} damage per second.",
parentId: this.id,
parentUUID: this.uuid,
});
this.spells.mindblaze = new Spell({
name: "Mindblaze",
hotkey: "W",
cooldown: 60,
targets: ["ground"],
requiresMode: "fire",
duration: 180,
description: "Gain control over an enemy unit. Lasts 3 minutes and the unit dies afterwards.",
parentId: this.id,
parentUUID: this.uuid,
});
this.spells.lightning = new Spell({
name: "Lightning",
hotkey: "Q",
cooldown: 10,
damage: 350,
targets: ["ground", "air"],
requiresMode: "lightning",
description: "Deal 350 damage.",
parentId: this.id,
parentUUID: this.uuid,
});
this.spells.lightningShield = new Spell({
name: "Lightning Shield",
hotkey: "W",
cooldown: 60,
damage: 150,
duration: 30,
targets: ["ground", "air"],
requiresMode: "lightning",
description:
"Add 300 shields to a unit for 30 seconds. \nWhen the shield is broken or expires, deal 150 damage to nearby enemy units.",
parentId: this.id,
parentUUID: this.uuid,
});
this.upgrades.burningFireball = new Upgrade({
name: "Burning Fireball",
description: "Fireball explodes when it reaches the target, setting the ground on fire.",
tier: "T1",
position: "A",
fluxCost: 100,
researchTime: 40,
parentId: this.id,
parentUUID: this.uuid,
});
this.upgrades.lightningOvercharge = new Upgrade({
name: "Lightning Overcharge",
description: "Killing a unit with lightning reduces cooldown of all abilities by 8 seconds.",
tier: "T1",
position: "B",
fluxCost: 100,
researchTime: 40,
parentId: this.id,
parentUUID: this.uuid,
});
this.upgrades.eternalFlame = new Upgrade({
name: "Eternal Flame",
description: "The Mindblaze Effect lasts permanently.",
tier: "T2",
position: "A",
fluxCost: 125,
researchTime: 50,
parentId: this.id,
parentUUID: this.uuid,
});
this.upgrades.thunder = new Upgrade({
name: "Thunder",
description: "Lighting Shield explosion deals double damage and stuns for 3 seconds.",
tier: "T2",
position: "B",
fluxCost: 125,
researchTime: 50,
parentId: this.id,
parentUUID: this.uuid,
});
this.upgrades.fromAshes = new Upgrade({
name: "From Ashes",
description: "When any hero dies, resurrects them. \n90 seconds cooldown.",
tier: "T3",
position: "A",
fluxCost: 150,
researchTime: 60,
parentId: this.id,
parentUUID: this.uuid,
});
this.upgrades.elementalShift = new Upgrade({
name: "Elemental Shift",
description:
"The shift buffs nearby units for 10 seconds. \nShift to Lightning: +40% movement speed. \nShift to Fire: +30% attack speed.",
tier: "T3",
position: "B",
fluxCost: 150,
researchTime: 60,
parentId: this.id,
parentUUID: this.uuid,
});
this.commanderTopbars.spawnObelisk = new LegionTopbar({
name: "Spawn Obelisks",
topbarType: "summon",
slot: 1,
energyCost: 10,
description:
"Spawns various obelisks on the battlefield. Available: Healing Obelisk, Guardian Obelisk, Summoning Obelisk, Warp Obelisk.",
requiredLevel: 1,
creates: ["coop/commander/galavax/building/coop-galavax-warp-obelisk"],
unlocks: ["coop/commander/galavax/building/coop-galavax-warp-obelisk"],
parentId: this.id,
parentUUID: this.uuid,
});
this.commanderTopbars.summonEmperor = new LegionTopbar({
name: "Summon Emperor",
topbarType: "summon",
slot: 2,
cooldown: 180,
energyCost: 20,
description:
"Summoning takes 15 seconds. Units dying nearby the site empower the Emperor. Thralls can be sacrificed with 75% cost refund by right-clicking on the site. Emperor loses health when summoned but is healed from units killed nearby.",
requiredLevel: 1,
parentId: this.id,
parentUUID: this.uuid,
});
this.commanderTopbars.spawnMonolith = new LegionTopbar({
name: "Spawn Monolith",
topbarType: "summon",
slot: 3,
cooldown: 180,
energyCost: 180,
description:
"Spawn a powerful defensive Monolith. \nIf a Thrall dies nearby, Monolith strikes a random enemy with an additional attack.",
requiredLevel: 7,
creates: ["coop/commander/galavax/building/coop-galavax-monolith"],
unlockedBy: ["coop/commander/galavax-commander/level/7"],
parentId: this.id,
parentUUID: this.uuid,
});
this.levels["1"] = new CommanderLevel({
name: "Galavax",
level: 1,
description: "A hero with power over elements and Legion armies at his disposal.",
parentId: this.id,
uuid: "14e09815-b5d5-48d3-9c89-eb41e4f0aba9",
});
this.levels["2"] = new CommanderLevel({
name: "Summoning Obelisk",
level: 2,
description:
"Galavax can calldown a Summoning Obelisk that spawns Thrall and Steelsworn.\n\nThrall Upgrades: Additional Thrall upgrades are now available for research in the Citadel.",
unlocks: ["coop/commander/galavax/building/coop-galavax-summoning-obelisk"],
parentId: this.id,
uuid: "bb4c2cd0-010b-4d5a-a80e-bb3f3425891e",
});
this.levels["3"] = new CommanderLevel({
name: "Elemental Attunement",
level: 3,
description: "Elemental Shift cooldown reduced and Galavax's weapons apply special effects.",
parentId: this.id,
uuid: "22781e73-1eb5-4356-a401-828c851c7b36",
});
this.levels["4"] = new CommanderLevel({
name: "Sacrifice to the Machine",
level: 4,
description:
"Thralls can be sacrificed to a Terror Tank to repair it and replenish its energy.\nTerror Tanks attack with increased attack speed at the cost of energy.",
parentId: this.id,
uuid: "08bd70ae-98cf-4c25-8be2-e7af6bd05ae6",
});
this.levels["5"] = new CommanderLevel({
name: "Assembly Routine",
level: 5,
description: "Reduced cost of Terror Tank modules.\n\nDreadnought Transport: Dreadnoughts can transport units.",
parentId: this.id,
uuid: "200418f5-26ce-4867-9f97-d0efbf337514",
});
this.levels["6"] = new CommanderLevel({
name: "Upgrade Cache",
level: 6,
description: "Unlocks additional upgrades for Galavax, Steelsworn, Dark Disciple and Storm Bringer.",
parentId: this.id,
uuid: "38ab6a72-5ccb-42c2-8e41-7b3b4fc993d0",
});
this.levels["7"] = new CommanderLevel({
name: "Spawn Monolith",
level: 7,
description: "Summon a powerful structure.\nNearby Thrall deaths cause bonus attacks to occur.",
unlocks: [
"coop/commander/galavax-commander/topbar/spawn-monolith",
"coop/commander/galavax/building/coop-galavax-monolith",
],
parentId: this.id,
uuid: "50739434-ccf2-426c-b593-5c9ee44a0347",
});
this.levels["8"] = new CommanderLevel({
name: "Expedited Training",
level: 8,
description: "-40% cost of training Thralls and Steelsworn.",
parentId: this.id,
uuid: "086e51b3-4c0a-434d-b7d0-5232dc6b5569",
});
this.levels["9"] = new CommanderLevel({
name: "Runic Markings",
level: 9,
description:
"+40% Obelisk health, attack and healing power.\n+4 attack and healing range.\nWarp Obelisks gain +200% extra health.",
parentId: this.id,
uuid: "f0f8a445-9643-4433-b7e1-4878a70faa52",
});
this.levels["10"] = new CommanderLevel({
name: "Consecrated Idal Conduit",
level: 10,
description: "Idal Conduits can be upgraded to generate a small amount of faction power over time.",
parentId: this.id,
uuid: "0806895f-7586-4cc0-8513-d4a27d518fc1",
});
this.levels["12"] = new CommanderLevel({
name: "Infantry Efficiency",
level: 11,
description: "Dark Disciples and Storm Bringers cost 25 less hexite and 25 less flux.",
parentId: this.id,
uuid: "d77a81ee-bd52-4b09-99ac-17daae74260a",
});
this.levels["11"] = new CommanderLevel({
name: "Emperor's Fury",
level: 12,
description: "The Emperor Projection restores its health when units die nearby, and gains a cleave ability.",
parentId: this.id,
uuid: "74811f21-d3b9-4129-a8a7-c57bb29eb87d",
});
}
}
export default GalavaxCoop;