57 lines
2.0 KiB
TypeScript
57 lines
2.0 KiB
TypeScript
import { describe, expect, it } from "vitest";
|
|
import type { RomGeneratedAbilityLike } from "./romAbilitySemantics";
|
|
import {
|
|
ROM_PRIEST_MAGE_ENLIGHTENMENT,
|
|
ROM_PRIEST_MAGE_ENLIGHTENMENT_PASSIVE_EFFECT,
|
|
ROM_PRIEST_MAGE_ENLIGHTENMENT_PASSIVE_TAG,
|
|
overrideRomPriestMageEffects,
|
|
romPriestMageEnlightenmentPassiveEffects,
|
|
} from "./romPriestMageRuntime";
|
|
|
|
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", () => {
|
|
it("replaces the local trigger payload with a permanent +12% Wisdom passive", () => {
|
|
expect(ROM_PRIEST_MAGE_ENLIGHTENMENT).toMatchObject({
|
|
passiveSpellId: 492_933,
|
|
wisdomPercent: 12,
|
|
});
|
|
expect(overrideRomPriestMageEffects(enlightenment, [])).toEqual([
|
|
ROM_PRIEST_MAGE_ENLIGHTENMENT_PASSIVE_EFFECT,
|
|
]);
|
|
expect(ROM_PRIEST_MAGE_ENLIGHTENMENT_PASSIVE_EFFECT).toMatchObject({
|
|
kind: "apply-aura",
|
|
recipient: "caster",
|
|
aura: {
|
|
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.12,
|
|
}],
|
|
},
|
|
triggerSpellId: 492_933,
|
|
});
|
|
expect(ROM_PRIEST_MAGE_ENLIGHTENMENT_PASSIVE_EFFECT.aura.id).toContain(":492933:");
|
|
expect(romPriestMageEnlightenmentPassiveEffects(false)).toEqual([]);
|
|
});
|
|
|
|
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();
|
|
});
|
|
|
|
});
|