Release Healer Man 0.1.6

This commit is contained in:
phenom
2026-08-20 14:05:50 -04:00
parent 55cfd43d66
commit b12fb84859
96 changed files with 10874 additions and 609 deletions
+47
View File
@@ -0,0 +1,47 @@
import { describe, expect, it } from "vitest";
import { createDeathKnightRunes, normalizeActorResourcePool } from "./combatActors";
import {
activateDeathKnightRunes,
advanceCombatResourcePool,
spendDeathKnightRunes,
} from "./combatResources";
describe("authentic combat resources", () => {
it("suppresses spirit mana regeneration for five seconds after spending", () => {
const mana = normalizeActorResourcePool("mana", 50, 100, 12, 1_000);
const insideRule = advanceCombatResourcePool(mana, {
inCombat: true,
actorLevel: 80,
now: 5_999,
deltaSeconds: 1,
manaSpiritRegenerationPerSecond: 8,
});
const outsideRule = advanceCombatResourcePool(mana, {
inCombat: true,
actorLevel: 80,
now: 6_000,
deltaSeconds: 1,
manaSpiritRegenerationPerSecond: 8,
});
expect(insideRule.current).toBe(54);
expect(outsideRule.current).toBe(62);
});
it("decays rage and runic power only out of combat", () => {
const rage = normalizeActorResourcePool("rage", 20, 100);
const runic = normalizeActorResourcePool("runic-power", 20, 100);
expect(advanceCombatResourcePool(rage, { inCombat: false, actorLevel: 80, now: 1, deltaSeconds: 1 }).current).toBe(17);
expect(advanceCombatResourcePool(runic, { inCombat: false, actorLevel: 80, now: 1, deltaSeconds: 1 }).current).toBe(17.5);
expect(advanceCombatResourcePool(rage, { inCombat: true, actorLevel: 80, now: 1, deltaSeconds: 1 }).current).toBe(20);
});
it("recharges six Death Knight runes independently", () => {
const initial = createDeathKnightRunes();
const first = spendDeathKnightRunes(initial, { frost: 1, unholy: 1 }, 1_000)!;
expect(first).toHaveLength(6);
expect(first.filter((rune) => rune.readyAt === 11_000)).toHaveLength(2);
expect(spendDeathKnightRunes(first, { frost: 2 }, 1_001)).toBeNull();
const activated = activateDeathKnightRunes(first, 1);
expect(activated.filter((rune) => rune.readyAt === 0)).toHaveLength(5);
});
});