Update Healer Man server

This commit is contained in:
phenom committed 2026-10-07 13:05:04 -04:00
1 parent 69809f7228
commit ff20ab8779
101 files changed
+16713 -945

No files matched your search

@@ -1,5 +1,5 @@
import { afterEach, beforeAll, describe, expect, it } from "vitest";
import { abilitiesForClass, abilityAtLevel, preloadAbilityCatalogsForClasses, type AbilityDefinition } from "./abilityCatalog";
import { abilitiesForClass, abilityAtLevel, abilityTalentNodeId, preloadAbilityCatalogsForClasses, type AbilityDefinition } from "./abilityCatalog";
import { PLAYER_AGGRO_ID } from "./aggro";
import { applyAura } from "./combatAuras";
import { useCombatStore } from "./combatStore";
@@ -63,6 +63,27 @@ describe("source immunity grants through actual runtime consumers", () => {
expect(useCombatStore.getState().castAbility(selected("warrior", "Berserker Rage").id, { now: 2_000 }))
.toMatchObject({ ok: false, reason: "player-controlled" });
});
it.each([
["fear", 19134],
["stun", 20511],
] as const)("rejects learned Bladestorm while under source %s without spending resources or purging", (mechanic, spellId) => {
prepare("player", mechanic, spellId);
const ability = selected("warrior", "Bladestorm");
const nodeId = abilityTalentNodeId(ability);
expect(nodeId).not.toBeNull();
// Synthetic learned rank isolates the cast-control gate from talent-tree allocation.
useCombatStore.setState({ talentRanks: { [nodeId!]: 1 } });
const before = useCombatStore.getState();
expect(useCombatStore.getState().castAbility(ability.id, { now: 2_000 }))
.toMatchObject({ ok: false, reason: "player-controlled" });
const after = useCombatStore.getState();
expect(after.auras).toEqual(before.auras);
expect(after.controlledUntil).toBe(before.controlledUntil);
expect(after.controlMechanic).toBe(mechanic);
expect(after.resourcePools).toEqual(before.resourcePools);
expect(after.cooldowns).toEqual(before.cooldowns);
expect(after.globalCooldownEndsAt).toBe(before.globalCooldownEndsAt);
});
it.each(["player", "party"] as const)("purges the whole FEAR-mechanic child and its rider for %s on an accepted Bladestorm grant", (recipient) => {
const id = prepare(recipient, "stun", 20511);
const ability = selected("warrior", "Bladestorm");