fix: runestone formula, prestige/transcendence rebalance, exploration fixes, and comprehensive balance audit #135

Merged
naomi merged 53 commits from fix/stones into main 2026-03-31 19:57:53 -07:00
2 changed files with 40 additions and 3 deletions
Showing only changes of commit 48477ee286 - Show all commits
@@ -84,7 +84,7 @@ const categoryOrder: Array<PrestigeUpgradeCategory> = [
const PrestigePanel = (): JSX.Element => {
const {
state,
reload,
reloadSilent,
formatNumber,
buyPrestigeUpgrade,
enableNotifications,
@@ -141,7 +141,7 @@ const PrestigePanel = (): JSX.Element => {
`You've reached prestige level ${data.newPrestigeCount.toString()}!`,
);
}
await reload();
await reloadSilent();
} catch (error_: unknown) {
setPrestigeError(
error_ instanceof Error
+38 -1
View File
@@ -310,6 +310,12 @@ interface GameContextValue {
*/
reload: ()=> Promise<void>;
/**
* Reload state from the server without showing the loading screen (used
* after prestige to avoid the visible flash/hang).
*/
reloadSilent: ()=> Promise<void>;
/**
* Unix timestamp of the last successful cloud save (null until first save response).
*/
@@ -718,6 +724,10 @@ export const GameProvider = ({
/* No-op placeholder */
});
const reloadSilentReference = useRef<()=> Promise<void>>(async() => {
/* No-op placeholder */
});
const [ schemaOutdated, setSchemaOutdated ] = useState(false);
const [ saveSchemaVersion, setSaveSchemaVersion ] = useState(0);
const [ currentSchemaVersion, setCurrentSchemaVersion ] = useState(0);
@@ -805,6 +815,32 @@ export const GameProvider = ({
reloadReference.current = reload;
const reloadSilent = useCallback(async() => {
setError(null);
try {
const data = await loadGame();
setState(data.state);
setLastSavedAt(data.state.player.lastSavedAt);
if (data.signature !== undefined) {
signatureReference.current = data.signature;
localStorage.setItem("elysium_save_signature", data.signature);
}
setLoginStreak(data.loginStreak);
setSchemaOutdated(data.schemaOutdated);
setSaveSchemaVersion(data.state.schemaVersion ?? 0);
setCurrentSchemaVersion(data.currentSchemaVersion);
setInGuild(data.inGuild);
} catch (error_: unknown) {
setError(
error_ instanceof Error
? error_.message
: "Failed to load game",
);
}
}, []);
reloadSilentReference.current = reloadSilent;
useEffect(() => {
enableSoundsReference.current = enableSounds;
}, [ enableSounds ]);
@@ -1315,7 +1351,7 @@ export const GameProvider = ({
if (enableNotificationsReference.current) {
sendNotification("⭐ Prestige!", "You have ascended!");
}
await reloadReference.current();
await reloadSilentReference.current();
}).
catch(() => {
@@ -2373,6 +2409,7 @@ export const GameProvider = ({
offlineEssence,
offlineGold,
reload,
reloadSilent,
resetProgress,
saveSchemaVersion,
schemaOutdated,