Release v0.1.3 2026-07-11

This commit is contained in:
Warren H
2026-07-11 23:23:02 -04:00
parent 076f6cf97c
commit b48b3a4f8f
103 changed files with 6708 additions and 454 deletions
+37
View File
@@ -0,0 +1,37 @@
import { describe, expect, it } from "vitest";
import { freshParty } from "./data";
import {
applyRunBuffsToParty,
bossHealthMultiplier,
runHealingMultiplier,
runMaxMana,
selectRandomBossPair,
} from "./roguelike";
describe("roguelike progression", () => {
it("adds 10% base boss HP per completed round", () => {
expect(bossHealthMultiplier(1)).toBe(1);
expect(bossHealthMultiplier(2)).toBe(1.1);
expect(bossHealthMultiplier(5)).toBe(1.4);
});
it("stacks each persistent buff independently", () => {
const buffs = ["vital-bloom", "vital-bloom", "deep-wells", "restoring-grace"] as const;
const party = applyRunBuffsToParty(freshParty("priest", "Aelia"), buffs);
expect(party[0].maxHp).toBe(124);
expect(party[1].maxHp).toBe(186);
expect(runMaxMana(buffs)).toBe(120);
expect(runHealingMultiplier(buffs)).toBe(1.15);
});
it("selects a distinct pair that excludes both bosses from the prior round", () => {
const values = [0, 0];
const pair = selectRandomBossPair(["bulldrome", "vexa"], () => values.shift() ?? 0);
expect(pair).toEqual(["cindermaw", "ember-mantis-duelist"]);
expect(new Set(pair)).toHaveLength(2);
expect(pair).not.toContain("bulldrome");
expect(pair).not.toContain("vexa");
});
});