fix: integer formatting, exploration durations, runestone preview, and gold achievement tracking
Security Scan and Upload / Security & DefectDojo Upload (pull_request) Successful in 1m8s
CI / Lint, Build & Test (pull_request) Failing after 1m12s

Closes #199
Closes #203
Closes #204
Closes #219
Closes #220
Closes #231
Closes #232
This commit is contained in:
2026-04-06 12:42:40 -07:00
committed by Naomi Carrigan
parent e53a25290b
commit 1c10df88fb
12 changed files with 170 additions and 105 deletions
+8 -2
View File
@@ -15,6 +15,7 @@ import { updateChallengeProgress } from "../services/dailyChallenges.js";
import { logger } from "../services/logger.js";
import {
buildPostPrestigeState,
calculatePrestigeThreshold,
computeRunestoneMultipliers,
isEligibleForPrestige,
} from "../services/prestige.js";
@@ -40,10 +41,15 @@ prestigeRouter.post("/", async(context) => {
const state = record.state as unknown as GameState;
if (!isEligibleForPrestige(state)) {
const thresholdMultiplier
= state.transcendence?.echoPrestigeThresholdMultiplier ?? 1;
const required = calculatePrestigeThreshold(
state.prestige.count,
thresholdMultiplier,
);
return context.json(
{
// eslint-disable-next-line stylistic/max-len -- Error message cannot be shortened
error: "Not eligible for prestige — collect 1,000,000 total gold first",
error: `Not eligible for prestige — collect ${required.toLocaleString()} total gold first`,
},
400,
);