generated from nhcarrigan/template
fix: rewrite prestige/transcendence formula and rebalance progression
This commit is contained in:
@@ -97,20 +97,21 @@ describe("isEligibleForTranscendence", () => {
|
||||
|
||||
describe("calculateEchoes", () => {
|
||||
it("handles prestige count of 0 by treating it as 1", () => {
|
||||
// safeCount = max(0, 1) = 1; floor(853 / sqrt(1)) = 853
|
||||
expect(calculateEchoes(0, 1)).toBe(853);
|
||||
// safeCount = max(0, 1) = 1; floor(224 / sqrt(1)) = 224
|
||||
expect(calculateEchoes(0, 1)).toBe(224);
|
||||
});
|
||||
|
||||
it("calculates echoes at count 1", () => {
|
||||
expect(calculateEchoes(1, 1)).toBe(853);
|
||||
// floor(224 / sqrt(1)) = 224
|
||||
expect(calculateEchoes(1, 1)).toBe(224);
|
||||
});
|
||||
|
||||
it("decreases echoes with higher prestige count", () => {
|
||||
const echoesAt1 = calculateEchoes(1, 1);
|
||||
const echoesAt4 = calculateEchoes(4, 1);
|
||||
expect(echoesAt4).toBeLessThan(echoesAt1);
|
||||
// floor(853 / sqrt(4)) = floor(853 / 2) = 426
|
||||
expect(echoesAt4).toBe(426);
|
||||
// floor(224 / sqrt(4)) = floor(224 / 2) = 112
|
||||
expect(echoesAt4).toBe(112);
|
||||
});
|
||||
|
||||
it("applies echoMetaMultiplier", () => {
|
||||
@@ -118,6 +119,11 @@ describe("calculateEchoes", () => {
|
||||
const withMult = calculateEchoes(1, 2);
|
||||
expect(withMult).toBe(base * 2);
|
||||
});
|
||||
|
||||
it("returns 50 echoes at the target prestige 20", () => {
|
||||
// floor(224 / sqrt(20)) = floor(224 / 4.472) = floor(50.09) = 50
|
||||
expect(calculateEchoes(20, 1)).toBe(50);
|
||||
});
|
||||
});
|
||||
|
||||
describe("buildPostTranscendenceState", () => {
|
||||
|
||||
Reference in New Issue
Block a user