Release v0.1.4 2026-07-12
This commit is contained in:
+17
-14
@@ -4,7 +4,7 @@ import { distance, pointToSegmentDistance } from "./geometry";
|
||||
import { barrierProtects, useGameStore } from "./store";
|
||||
import { createClassInventory, HEALER_CLASSES } from "./healers";
|
||||
import { dropVexaVenomPool, VEXA_VENOM } from "./bosses/vexa";
|
||||
import { isInsideArena } from "./arena";
|
||||
import { ARENA_CENTER, isInsideArena } from "./arena";
|
||||
import { BOSS_DEFINITIONS } from "./bossCatalog";
|
||||
|
||||
describe("Disc Priest combat simulation", () => {
|
||||
@@ -272,7 +272,7 @@ describe("Disc Priest combat simulation", () => {
|
||||
bossMotion: {
|
||||
...state.bossMotion,
|
||||
mode: "returning",
|
||||
position: [0, -4.25],
|
||||
position: [0, -1],
|
||||
chargesSincePounce: 3,
|
||||
},
|
||||
}));
|
||||
@@ -300,9 +300,9 @@ describe("Disc Priest combat simulation", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe("Vexa encounter", () => {
|
||||
describe("Broodfang encounter", () => {
|
||||
beforeEach(() => {
|
||||
useGameStore.getState().configureHealer("priest", "Aelia", createClassInventory("priest"), "vexa");
|
||||
useGameStore.getState().configureHealer("priest", "Aelia", createClassInventory("priest"), "broodfang-spider");
|
||||
useGameStore.getState().startEncounter();
|
||||
useGameStore.setState((state) => ({ boss: { ...state.boss, nextMeleeAt: 999 } }));
|
||||
});
|
||||
@@ -364,20 +364,23 @@ describe("Vexa encounter", () => {
|
||||
expect(useGameStore.getState().party[0].hp).toBe(secondTickHp);
|
||||
});
|
||||
|
||||
it("follows Brann when the tank is displaced", () => {
|
||||
it("returns to the room center when the tank is displaced", () => {
|
||||
useGameStore.setState((state) => ({
|
||||
partyPositions: { ...state.partyPositions, brann: [3, 1] },
|
||||
bossMotion: { ...state.bossMotion, nextMechanicAt: 999 },
|
||||
bossMotion: { ...state.bossMotion, position: [5, 5], nextMechanicAt: 999 },
|
||||
}));
|
||||
const startX = useGameStore.getState().bossMotion.position[0];
|
||||
const start = useGameStore.getState().bossMotion.position;
|
||||
useGameStore.getState().tick(0.5);
|
||||
expect(useGameStore.getState().bossMotion.position[0]).toBeGreaterThan(startX);
|
||||
const result = useGameStore.getState().bossMotion.position;
|
||||
expect(Math.hypot(result[0] - ARENA_CENTER[0], result[1] - ARENA_CENTER[1])).toBeLessThan(
|
||||
Math.hypot(start[0] - ARENA_CENTER[0], start[1] - ARENA_CENTER[1]),
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe("PVE dual-boss encounter", () => {
|
||||
beforeEach(() => {
|
||||
useGameStore.getState().configureHealer("priest", "Aelia", createClassInventory("priest"), ["vexa", "cindermaw"]);
|
||||
useGameStore.getState().configureHealer("priest", "Aelia", createClassInventory("priest"), ["broodfang-spider", "tempestscale-dragon"]);
|
||||
useGameStore.getState().startEncounter();
|
||||
useGameStore.setState((state) => ({
|
||||
boss: { ...state.boss, nextMeleeAt: 999 },
|
||||
@@ -387,8 +390,8 @@ describe("PVE dual-boss encounter", () => {
|
||||
|
||||
it("runs two distinct bosses concurrently and requires both to fall", () => {
|
||||
const initial = useGameStore.getState();
|
||||
expect(initial.boss.id).toBe("vexa");
|
||||
expect(initial.additionalBosses.map((entry) => entry.boss.id)).toEqual(["cindermaw"]);
|
||||
expect(initial.boss.id).toBe("broodfang-spider");
|
||||
expect(initial.additionalBosses.map((entry) => entry.boss.id)).toEqual(["tempestscale-dragon"]);
|
||||
expect(initial.bossMotion.position[0]).toBeLessThan(initial.additionalBosses[0].motion.position[0]);
|
||||
|
||||
useGameStore.getState().tick(1);
|
||||
@@ -421,7 +424,7 @@ describe("Roguelike rounds", () => {
|
||||
"priest",
|
||||
"Aelia",
|
||||
createClassInventory("priest"),
|
||||
["bulldrome", "vexa"],
|
||||
["bulldrome", "broodfang-spider"],
|
||||
"roguelike",
|
||||
);
|
||||
useGameStore.getState().startEncounter();
|
||||
@@ -489,9 +492,9 @@ describe("shared arena boundary", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe("Cindermaw encounter", () => {
|
||||
describe("Tempestscale encounter", () => {
|
||||
beforeEach(() => {
|
||||
useGameStore.getState().configureHealer("priest", "Aelia", createClassInventory("priest"), "cindermaw");
|
||||
useGameStore.getState().configureHealer("priest", "Aelia", createClassInventory("priest"), "tempestscale-dragon");
|
||||
useGameStore.getState().startEncounter();
|
||||
useGameStore.setState((state) => ({ boss: { ...state.boss, nextMeleeAt: 999 } }));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user