Files
healer-man/src/game/biteSizedBossBalance.test.ts
T
2026-09-27 14:31:15 -04:00

31 lines
1.6 KiB
TypeScript

import { describe, expect, it } from "vitest";
import { dungeonEnemyScaling } from "./dungeonBossScaling";
import { prepareDungeonSessionDefinition, requireDungeonDefinition } from "./dungeonRegistry";
describe("Bite-Sized boss durability", () => {
for (const [id, sourceId] of [
["bite-sized-hoto-teeth", "hoto"],
["bite-sized-stormwind-stockade", "stormwind-stockade"],
] as const) {
it(`shortens ${id} without changing ${sourceId} or its trash`, () => {
const route = prepareDungeonSessionDefinition(id, "bite-sized-balance-0")!;
const source = requireDungeonDefinition(sourceId);
const boss = route.bosses[0];
const spawn = route.encounterSpawnGroups?.flatMap((group) => group.spawns)
.find((candidate) => candidate.id === boss.id)
?? route.staticSpawns.find((candidate) => candidate.id === boss.id);
expect(spawn).toBeDefined();
const entity = route.entities[spawn!.entityId];
const short = dungeonEnemyScaling(route, entity, boss.id, 60, "normal", 1, "wow");
const campaign = dungeonEnemyScaling(source, entity, boss.id, 60, "normal", 1, "wow");
expect(short.maxHealth).toBeGreaterThan(25_000);
expect(short.maxHealth).toBeLessThan(50_000);
expect(campaign.maxHealth).toBeGreaterThan(short.maxHealth);
const trash = route.staticSpawns.find((candidate) => route.entities[candidate.entityId]?.kind === "mob")!;
expect(dungeonEnemyScaling(route, route.entities[trash.entityId], trash.id,
60, "normal", 1, "wow")).toEqual(dungeonEnemyScaling(source,
route.entities[trash.entityId], trash.id, 60, "normal", 1, "wow"));
});
}
});