Update Healer Man server

This commit is contained in:
phenom committed 2026-10-02 10:38:12 -04:00
1 parent 4c768fbec6
commit b16821e92e
330 files changed
+35406 -1760

No files matched your search

+31 -79
View File
@@ -1,104 +1,56 @@
import { describe, expect, it } from "vitest";
import { ROM_ALL_ABILITIES } from "./romAbilityCatalog";
import type { RomGeneratedAbilityLike } from "./romAbilitySemantics";
import {
ROM_PRIEST_MAGE_ENLIGHTENMENT,
ROM_PRIEST_MAGE_ENLIGHTENMENT_COOLDOWN_EFFECT,
romPriestMageEnlightenmentProc,
romPriestMageEnlightenmentReadyAt,
ROM_PRIEST_MAGE_ENLIGHTENMENT_PASSIVE_EFFECT,
ROM_PRIEST_MAGE_ENLIGHTENMENT_PASSIVE_TAG,
overrideRomPriestMageEffects,
romPriestMageEnlightenmentPassiveEffects,
} from "./romPriestMageRuntime";
const heal = ROM_ALL_ABILITIES.find((ability) => ability.dbcSpellId === 490_261)!;
const learnedPassive = [ROM_PRIEST_MAGE_ENLIGHTENMENT.passiveSpellId];
const enlightenment: RomGeneratedAbilityLike = {
classId: "rom-priest",
secondaryClassId: "rom-mage",
sourceSkillId: 492_933,
name: "Enlightenment",
description: "RuneWaker's older Heal-trigger effect.",
passive: true,
};
describe("RoM Priest/Mage Enlightenment runtime", () => {
it("grants the source-defined Wisdom aura after completing Heal", () => {
describe("RoM Priest/Mage Enlightenment", () => {
it("replaces the local trigger payload with a permanent +12% Wisdom passive", () => {
expect(ROM_PRIEST_MAGE_ENLIGHTENMENT).toMatchObject({
passiveSpellId: 492_933,
triggerSpellId: 490_261,
wisdomComponentId: 503_197,
cooldownComponentId: 506_532,
wisdomPercent: 1,
durationMs: 8_000,
cooldownMs: 20_000,
wisdomPercent: 12,
});
const result = romPriestMageEnlightenmentProc(
"rom-priest",
"rom-mage",
heal,
learnedPassive,
true,
2_000,
2_000,
);
expect(result.nextReadyAt).toBe(22_000);
expect(result.effect).toMatchObject({
expect(overrideRomPriestMageEffects(enlightenment, [])).toEqual([
ROM_PRIEST_MAGE_ENLIGHTENMENT_PASSIVE_EFFECT,
]);
expect(ROM_PRIEST_MAGE_ENLIGHTENMENT_PASSIVE_EFFECT).toMatchObject({
kind: "apply-aura",
recipient: "caster",
triggerSpellId: 492_933,
aura: {
id: "rom-priest-mage-enlightenment",
durationMs: 8_000,
maxStacks: 1,
stackBehavior: "refresh",
id: ROM_PRIEST_MAGE_ENLIGHTENMENT_PASSIVE_TAG,
name: "Enlightenment",
description: "Increases Wisdom by 12%.",
durationMs: null,
modifiers: [{
kind: "stat",
stat: "wisdom",
operation: "percent",
value: 0.01,
value: 0.12,
}],
},
});
expect(ROM_PRIEST_MAGE_ENLIGHTENMENT_COOLDOWN_EFFECT).toMatchObject({
recipient: "caster",
triggerSpellId: 492_933,
aura: {
durationMs: 20_000,
hideFromAuraStrip: true,
utilityTags: [ROM_PRIEST_MAGE_ENLIGHTENMENT.cooldownAuraTag],
},
});
expect(ROM_PRIEST_MAGE_ENLIGHTENMENT_PASSIVE_EFFECT.aura.id).toContain(":492933:");
expect(romPriestMageEnlightenmentPassiveEffects(false)).toEqual([]);
});
it("keeps the per-caster cooldown independent and ready at expiration", () => {
const activeAuras = [
{
targetId: "priest-a",
expiresAt: 12_000,
definition: {
id: "enlightenment-cooldown-test",
name: "Enlightenment cooldown test",
disposition: "buff" as const,
durationMs: ROM_PRIEST_MAGE_ENLIGHTENMENT.cooldownMs,
utilityTags: [ROM_PRIEST_MAGE_ENLIGHTENMENT.cooldownAuraTag],
},
},
];
expect(romPriestMageEnlightenmentReadyAt(activeAuras, "priest-a", 5_000)).toBe(12_000);
expect(romPriestMageEnlightenmentReadyAt(activeAuras, "priest-b", 5_000)).toBe(5_000);
expect(romPriestMageEnlightenmentReadyAt(activeAuras, "priest-a", 12_000)).toBe(12_000);
it("does not apply the rework to a different class pair or spell identity", () => {
expect(overrideRomPriestMageEffects({ ...enlightenment, secondaryClassId: "rom-warrior" }, [])).toBeNull();
expect(overrideRomPriestMageEffects({ ...enlightenment, classId: "rom-mage" }, [])).toBeNull();
expect(overrideRomPriestMageEffects({ ...enlightenment, sourceSkillId: 492_638 }, [])).toBeNull();
});
it("rejects other builds, spells, sources, unlearned passives, incomplete casts, and cooldown casts", () => {
const rejected = [
romPriestMageEnlightenmentProc("rom-mage", "rom-priest", heal, learnedPassive, true, 0, 1),
romPriestMageEnlightenmentProc("rom-priest", undefined, heal, learnedPassive, true, 0, 1),
romPriestMageEnlightenmentProc("rom-priest", "rom-mage", { ...heal, dbcSpellId: 490_204 }, learnedPassive, true, 0, 1),
romPriestMageEnlightenmentProc("rom-priest", "rom-mage", { ...heal, source: "core" }, learnedPassive, true, 0, 1),
romPriestMageEnlightenmentProc("rom-priest", "rom-mage", heal, [], true, 0, 1),
romPriestMageEnlightenmentProc("rom-priest", "rom-mage", heal, learnedPassive, false, 0, 1),
romPriestMageEnlightenmentProc("rom-priest", "rom-mage", heal, learnedPassive, true, 5_000, 4_999),
];
for (const result of rejected) {
expect(result.effect).toBeNull();
expect(result.nextReadyAt).toBeGreaterThanOrEqual(0);
}
});
it("suppresses the generated passive aura while keeping Heal available", () => {
const passive = ROM_ALL_ABILITIES.find((ability) => ability.id === "rom-priest-rom-mage-elite-40");
expect(passive?.effects).toEqual([]);
expect(passive?.ranks?.[0]?.effects).toEqual([]);
expect(heal).toMatchObject({ classId: "rom-priest", dbcSpellId: 490_261, source: "runewaker" });
});
});