Update Healer Man server
This commit is contained in:
1 parent
9d7e0e2f9e
commit
35dfdaed61
94 files changed
+17034
-418
No files matched your search
@@ -0,0 +1,34 @@
|
||||
import { beforeEach, describe, expect, it } from "vitest";
|
||||
import { useCombatStore } from "./combatStore";
|
||||
|
||||
describe("Death Knight Empower Rune Weapon runtime", () => {
|
||||
beforeEach(() => {
|
||||
useCombatStore.getState().initializeCharacter({ classId: "death-knight", level: 80, xp: 0 });
|
||||
});
|
||||
|
||||
it("restores all six spent runes when cast", () => {
|
||||
const ability = useCombatStore.getState().abilities.find((candidate) => candidate.name === "Empower Rune Weapon");
|
||||
expect(ability).toBeDefined();
|
||||
useCombatStore.setState((state) => ({
|
||||
deathKnightRunes: state.deathKnightRunes.map((rune) => ({ ...rune, readyAt: 11_000 })),
|
||||
}));
|
||||
|
||||
const result = useCombatStore.getState().castAbility(ability!.id, { origin: [0, 0, 0], now: 1_000 });
|
||||
|
||||
expect(result.ok).toBe(true);
|
||||
expect(useCombatStore.getState().deathKnightRunes).toHaveLength(6);
|
||||
expect(useCombatStore.getState().deathKnightRunes.every((rune) => rune.readyAt === 0)).toBe(true);
|
||||
});
|
||||
|
||||
it("generates the source-listed 25 Runic Power when cast", () => {
|
||||
const ability = useCombatStore.getState().abilities.find((candidate) => candidate.name === "Empower Rune Weapon");
|
||||
expect(ability).toBeDefined();
|
||||
useCombatStore.setState({ resource: 0, resourcePools: { "runic-power": 0 } });
|
||||
|
||||
const result = useCombatStore.getState().castAbility(ability!.id, { origin: [0, 0, 0], now: 1_000 });
|
||||
|
||||
expect(result.ok).toBe(true);
|
||||
expect(useCombatStore.getState().resource).toBe(25);
|
||||
expect(useCombatStore.getState().resourcePools["runic-power"]).toBe(25);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user