ZSGG Public Library
Galavax (Commander)
Legion Co-Op Coop Commander Unit
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";
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-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-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: "Ionic Surge",
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 30 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.5",
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.5",
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.5",
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.5",
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.5",
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.5",
fluxCost: 150,
researchTime: 60,
parentId: this.id,
parentUUID: this.uuid,
});
this.commanderTopbars.spawnObelisk = new LegionTopbar({
name: "Spawn Obelisk",
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: 10,
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: "Elemental Shift",
level: 2,
description: "Galavax gains the ability to switch between Fire and Lightning modes.",
parentId: this.id,
uuid: "bb4c2cd0-010b-4d5a-a80e-bb3f3425891e",
});
this.levels["3"] = new CommanderLevel({
name: "Assembly Routine",
level: 3,
description: "Reduced cost of Terror Tank modules.",
parentId: this.id,
uuid: "22781e73-1eb5-4356-a401-828c851c7b36",
});
this.levels["4"] = new CommanderLevel({
name: "Summoning Obelisk",
level: 4,
description: "Galavax can calldown a Summoning Obelisk that spawns Thralls.",
parentId: this.id,
uuid: "08bd70ae-98cf-4c25-8be2-e7af6bd05ae6",
});
this.levels["5"] = new CommanderLevel({
name: "Expedited Training",
level: 5,
description: "-40% cost of training Thralls and Steelsworn",
parentId: this.id,
uuid: "200418f5-26ce-4867-9f97-d0efbf337514",
});
this.levels["6"] = new CommanderLevel({
name: "Runic Markings",
level: 6,
description: "+40% Obelisk health, attack, and healing power.",
parentId: this.id,
uuid: "38ab6a72-5ccb-42c2-8e41-7b3b4fc993d0",
});
this.levels["7"] = new CommanderLevel({
name: "Shadow Training",
level: 7,
description: "Dark Disciples gain +50% health and attack damage, and the ability to channel Storm.",
parentId: this.id,
uuid: "50739434-ccf2-426c-b593-5c9ee44a0347",
});
this.levels["8"] = new CommanderLevel({
name: "Consecrated Idal Conduits",
level: 8,
description: "Idal Conduits can be upgraded to generate a small amount of faction power over time.",
parentId: this.id,
uuid: "086e51b3-4c0a-434d-b7d0-5232dc6b5569",
});
this.levels["9"] = new CommanderLevel({
name: "Dreadnought",
level: 9,
description: "Construct a Dreadnought. \nDreadnoughts are heavy aircraft with installable turrets.",
parentId: this.id,
uuid: "f0f8a445-9643-4433-b7e1-4878a70faa52",
});
this.levels["10"] = new CommanderLevel({
name: "Spawn Monolith",
level: 10,
description: "Monolith can be called down on the battlefield.",
parentId: this.id,
uuid: "0806895f-7586-4cc0-8513-d4a27d518fc1",
});
}
}
export default GalavaxCoop;