fix: rewrite prestige/transcendence formula and rebalance progression
Security Scan and Upload / Security & DefectDojo Upload (pull_request) Successful in 1m8s
CI / Lint, Build & Test (pull_request) Successful in 1m11s

This commit is contained in:
2026-03-24 20:44:25 -07:00
committed by Naomi Carrigan
parent 0d6d05e50b
commit 0ae6aa12b2
7 changed files with 98 additions and 88 deletions
+10 -7
View File
@@ -55,15 +55,18 @@ const makeMinimalState = (overrides: Partial<GameState> = {}): GameState =>
describe("calculatePrestigeThreshold", () => {
it("returns base threshold at count 0", () => {
// base × (0+1)^2 = 1_000_000 × 1 = 1_000_000
expect(calculatePrestigeThreshold(0)).toBe(1_000_000);
});
it("returns 5× at count 1", () => {
expect(calculatePrestigeThreshold(1)).toBe(5_000_000);
it("returns 4× base at count 1", () => {
// base × (1+1)^2 = 1_000_000 × 4 = 4_000_000
expect(calculatePrestigeThreshold(1)).toBe(4_000_000);
});
it("returns 25× at count 2", () => {
expect(calculatePrestigeThreshold(2)).toBe(25_000_000);
it("returns 9× base at count 2", () => {
// base × (2+1)^2 = 1_000_000 × 9 = 9_000_000
expect(calculatePrestigeThreshold(2)).toBe(9_000_000);
});
it("applies threshold multiplier correctly", () => {
@@ -128,12 +131,12 @@ describe("calculateProductionMultiplier", () => {
expect(calculateProductionMultiplier(0)).toBe(1);
});
it("returns 1.15 at count 1", () => {
expect(calculateProductionMultiplier(1)).toBeCloseTo(1.15);
it("returns 1.25 at count 1", () => {
expect(calculateProductionMultiplier(1)).toBeCloseTo(1.25);
});
it("scales exponentially", () => {
expect(calculateProductionMultiplier(10)).toBeCloseTo(Math.pow(1.15, 10));
expect(calculateProductionMultiplier(10)).toBeCloseTo(Math.pow(1.25, 10));
});
});