Release Healer Man 0.1.14

This commit is contained in:
phenom committed 2026-09-05 11:40:50 -04:00
1 parent 67d7a8ebe7
commit 7b41b102fa
147 files changed
+169892 -1342

No files matched your search

+56
View File
@@ -0,0 +1,56 @@
import { describe, expect, it } from "vitest";
import { normalizeEnemyAttack, type EnemyAttackDefinition } from "./enemyAttacks";
function attack(overrides: Partial<EnemyAttackDefinition>): EnemyAttackDefinition {
return {
id: "test-special",
name: "Test Special",
delivery: "area",
target: "nearby-party",
school: "physical",
animation: "attack",
range: 12,
cooldownMs: 10_000,
damageMultiplier: 1,
...overrides,
};
}
describe("enemy attack telegraphs", () => {
it("infers a warned cone for legacy frontal mechanics", () => {
const normalized = normalizeEnemyAttack(attack({ name: "Stone Cleave" }));
expect(normalized.telegraph).toMatchObject({
shape: "cone",
anchor: "source",
warningMs: 1_650,
});
expect(normalized.castTimeMs).toBe(1_650);
});
it("preserves authored geometry and extends too-short cast warnings", () => {
const normalized = normalizeEnemyAttack(attack({
name: "Falling Ruin",
castTimeMs: 500,
telegraph: {
shape: "circle",
anchor: "target",
warningMs: 2_200,
radius: 7,
},
}));
expect(normalized.castTimeMs).toBe(2_200);
expect(normalized.telegraph).toEqual({
shape: "circle",
anchor: "target",
warningMs: 2_200,
radius: 7,
});
});
it("does not telegraph basic attacks or beneficial mechanics", () => {
expect(normalizeEnemyAttack(attack({ id: "basic-attack" })).telegraph).toBeUndefined();
expect(normalizeEnemyAttack(attack({
effect: { kind: "heal", multiplier: 1 },
})).telegraph).toBeUndefined();
});
});