feat: another balance and bug fix pass (#238)
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 1m10s
CI / Lint, Build & Test (push) Successful in 1m13s

Working through open issues — fixes, balance changes, and features.

## Closed

- Closes #161
- Closes #181
- Closes #191
- Closes #199
- Closes #201
- Closes #202
- Closes #203
- Closes #204
- Closes #205
- Closes #206
- Closes #208
- Closes #211
- Closes #212
- Closes #213
- Closes #214
- Closes #216
- Closes #219
- Closes #220
- Closes #221
- Closes #222
- Closes #224
- Closes #225
- Closes #226
- Closes #228
- Closes #229
- Closes #230
- Closes #231
- Closes #232
- Closes #233
- Closes #234
- Closes #235
- Closes #236

 This PR was created with help from Hikari~ 🌸

Reviewed-on: #238
Co-authored-by: Hikari <hikari@nhcarrigan.com>
Co-committed-by: Hikari <hikari@nhcarrigan.com>
This commit was merged in pull request #238.
This commit is contained in:
2026-04-06 18:17:00 -07:00
committed by Naomi Carrigan
parent b0227c1709
commit 1195b657a0
34 changed files with 980 additions and 203 deletions
+23 -5
View File
@@ -546,6 +546,17 @@ const validateAndSanitize = (
? previous.prestige
: incoming.prestige;
/*
* If the DB prestige count is higher than the client's, the client is sending a
* stale pre-prestige save. Discard its upgrades (which have purchased: true) in
* favour of the DB's post-prestige upgrades (purchased: false) so that upgrade
* multipliers cannot persist across prestige via a race-condition auto-save.
*/
const upgrades
= incoming.prestige.count < previous.prestige.count
? previous.upgrades
: incoming.upgrades;
/*
* Echoes are only granted server-side via transcendence and can only decrease between
* saves (spent on echo upgrades). Cap at the previous value to block inflation.
@@ -611,11 +622,17 @@ const validateAndSanitize = (
= Math.min(material.quantity, previousQuantity);
return { ...material, quantity: cappedQuantity };
});
const craftedRecipeIds = incoming.exploration.craftedRecipeIds.filter(
(recipeId) => {
return previousExploration.craftedRecipeIds.includes(recipeId);
},
);
/*
* Merge crafted recipe IDs from both states so the list can only ever grow.
* A stale auto-save arriving after a craft must not silently un-craft items.
*/
const craftedRecipeIds = [
...new Set([
...previousExploration.craftedRecipeIds,
...incoming.exploration.craftedRecipeIds,
]),
];
explorationSpread = {
exploration: {
...incoming.exploration,
@@ -671,6 +688,7 @@ const validateAndSanitize = (
prestige,
quests,
resources,
upgrades,
...transcendenceSpread,
...apotheosisSpread,
...explorationSpread,