Release v0.1.4 2026-07-12

This commit is contained in:
Warren H
2026-07-12 13:49:46 -04:00
parent b48b3a4f8f
commit bef71d391a
803 changed files with 3800 additions and 358322 deletions
+9 -8
View File
@@ -1,8 +1,8 @@
import { describe, expect, it } from "vitest";
import { buildCollections, MODE_COPY, selectRandomBoss } from "./data";
import { selectRandomBossPair } from "../game/roguelike";
import { BOSS_DROP_TABLES, createEmptyCollectionLog } from "../game/progression/loot";
import { BOSS_ORDER } from "../game/bossCatalog";
import { GROUP_DROP_TABLES, createEmptyCollectionLog } from "../game/progression/loot";
import { AVAILABLE_BOSS_IDS, BOSS_GROUPS } from "../game/bossCatalog";
describe("game mode configuration", () => {
it("separates randomized PVE from selectable Dungeons", () => {
@@ -11,24 +11,25 @@ describe("game mode configuration", () => {
});
it("selects a boss across the full encounter pool", () => {
for (let index = 0; index < BOSS_ORDER.length; index += 1) {
expect(selectRandomBoss(() => (index + 0.5) / BOSS_ORDER.length)).toBe(BOSS_ORDER[index]);
for (let index = 0; index < AVAILABLE_BOSS_IDS.length; index += 1) {
expect(selectRandomBoss(() => (index + 0.5) / AVAILABLE_BOSS_IDS.length)).toBe(AVAILABLE_BOSS_IDS[index]);
}
});
it("selects two distinct bosses for PVE", () => {
const values = [0, 0];
const pair = selectRandomBossPair([], () => values.shift() ?? 0);
expect(pair).toEqual(["bulldrome", "vexa"]);
expect(pair).toEqual(["bulldrome", "sandglass-scorpion"]);
expect(new Set(pair)).toHaveLength(2);
});
it("derives collection entries from canonical boss drop tables", () => {
it("derives group collection entries from canonical group drop tables", () => {
const collections = buildCollections(createEmptyCollectionLog(), {});
expect(collections.map((boss) => boss.bossId)).toEqual(BOSS_ORDER);
expect(collections.map((group) => group.groupId)).toEqual(BOSS_GROUPS.map((group) => group.id));
expect(collections.flatMap((group) => group.bosses.map((boss) => boss.bossId)).sort()).toEqual([...AVAILABLE_BOSS_IDS].sort());
for (const collection of collections) {
expect(collection.drops.map((drop) => drop.id)).toEqual(
BOSS_DROP_TABLES[collection.bossId as keyof typeof BOSS_DROP_TABLES].entries.map((drop) => drop.id),
GROUP_DROP_TABLES[collection.groupId].entries.map((drop) => drop.id),
);
}
});