Release Healer Man 0.1.21
This commit is contained in:
1 parent
699fc858c9
commit
f6f2375145
210 files changed
+976039
-6247
No files matched your search
@@ -0,0 +1,40 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { DUNGEON_DEFINITIONS } from "./dungeonRegistry";
|
||||
import { normalizeEnemyAttack } from "./enemyAttacks";
|
||||
|
||||
const NON_HARMFUL_EFFECTS = new Set([
|
||||
"heal",
|
||||
"aura",
|
||||
"transform",
|
||||
"summon",
|
||||
"call-for-help",
|
||||
"encounter-event",
|
||||
]);
|
||||
|
||||
describe("boss mechanic telegraph coverage", () => {
|
||||
it("uses the same warned geometry for every harmful boss area mechanic", () => {
|
||||
let bosses = 0;
|
||||
let mechanics = 0;
|
||||
for (const dungeon of DUNGEON_DEFINITIONS) {
|
||||
for (const entity of Object.values(dungeon.entities)) {
|
||||
if (entity.kind !== "boss" || !entity.combat) continue;
|
||||
bosses += 1;
|
||||
for (const rawAttack of entity.combat.attacks) {
|
||||
const attack = normalizeEnemyAttack(rawAttack);
|
||||
if (attack.id === "basic-attack") continue;
|
||||
mechanics += 1;
|
||||
const harmful = !attack.effect || !NON_HARMFUL_EFFECTS.has(attack.effect.kind);
|
||||
if (harmful && (attack.delivery === "area" || attack.radius !== undefined)) {
|
||||
expect(attack.telegraph, `${dungeon.id}:${entity.name}:${attack.name}`).toBeDefined();
|
||||
}
|
||||
if (attack.telegraph) {
|
||||
expect(attack.castTimeMs ?? 0, `${dungeon.id}:${entity.name}:${attack.name}`)
|
||||
.toBeGreaterThanOrEqual(attack.telegraph.warningMs);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
expect(bosses).toBeGreaterThan(100);
|
||||
expect(mechanics).toBeGreaterThan(300);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user