Release v0.1.8 2026-07-13

This commit is contained in:
Warren H
2026-07-13 17:21:10 -04:00
parent 77fd434226
commit 18c416d4d2
29 changed files with 1120 additions and 159 deletions
+12 -1
View File
@@ -1,5 +1,5 @@
import { describe, expect, it } from "vitest";
import { AVAILABLE_BOSS_IDS } from "./bossCatalog";
import { AVAILABLE_BOSS_IDS, BOSS_DEFINITIONS } from "./bossCatalog";
import {
RUN_BUFF_ORDER,
RUN_BUFFS,
@@ -97,6 +97,17 @@ describe("roguelike progression", () => {
expect(trio.every((bossId) => !seen.includes(bossId as typeof seen[number]))).toBe(true);
});
it("never selects two Memory Sequence bosses in one pair or trio", () => {
const pair = selectRandomBossPair([], () => 0.04);
const trio = selectUnseenBosses(3, [], () => 0);
const memoryBossCount = (bossIds: readonly (typeof AVAILABLE_BOSS_IDS)[number][]) => bossIds
.filter((bossId) => BOSS_DEFINITIONS[bossId].mechanicIds.includes("memory-sequence"))
.length;
expect(memoryBossCount(pair)).toBeLessThanOrEqual(1);
expect(memoryBossCount(trio)).toBeLessThanOrEqual(1);
});
it("fails instead of silently reusing seen bosses when unseen pool is too small", () => {
expect(() => selectUnseenBosses(3, AVAILABLE_BOSS_IDS.slice(0, -2))).toThrow(/Cannot select 3 unseen bosses/);
});