forked from phenom/healer-man
Release Healer Man 0.1.46
This commit is contained in:
1 parent
f82daf1c13
commit
9ff574ac0b
73 files changed
+33486
-174
No files matched your search
@@ -0,0 +1,32 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { estimateBossPartyPressure, rankBossPartyPressure } from "./bossPressure";
|
||||
import { DUNGEON_DEFINITIONS } from "./dungeonRegistry";
|
||||
|
||||
describe("boss party-pressure audit", () => {
|
||||
it("produces a finite deterministic ranking for every WoW boss", () => {
|
||||
const definitions = DUNGEON_DEFINITIONS.filter((dungeon) => dungeon.expansion !== "runewaker");
|
||||
const first = rankBossPartyPressure(definitions);
|
||||
const second = rankBossPartyPressure(definitions);
|
||||
expect(first.length).toBeGreaterThan(200);
|
||||
expect(second).toEqual(first);
|
||||
expect(first.every((entry) => Number.isFinite(entry.partyDamagePerSecond)
|
||||
&& entry.partyDamagePerSecond >= 0)).toBe(true);
|
||||
expect(first.map((entry) => entry.partyDamage)).toEqual(
|
||||
[...first.map((entry) => entry.partyDamage)].sort((left, right) => right - left),
|
||||
);
|
||||
});
|
||||
|
||||
it("counts grouped effects across the party and excludes self-only utility", () => {
|
||||
const gundrak = DUNGEON_DEFINITIONS.find((dungeon) => dungeon.id === "gundrak")!;
|
||||
const eckId = Object.entries(gundrak.entities)
|
||||
.find(([, entity]) => entity.combat?.serverEntry === 29_932)![0];
|
||||
const estimate = estimateBossPartyPressure(gundrak, eckId);
|
||||
expect(estimate.boss).toBe("Eck the Ferocious");
|
||||
expect(estimate.attacks.find((attack) => attack.spellId === 55_837)?.partyDamage).toBe(0);
|
||||
expect(estimate.attacks.find((attack) => attack.spellId === 55_816)?.partyDamage).toBe(0);
|
||||
expect(estimate.attacks.find((attack) => attack.spellId === 55_815)).toMatchObject({
|
||||
target: "random-party",
|
||||
targetsPerCast: 1,
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user