feat: add lifetime stats to player profile

Introduce six lifetime stat fields (gold, clicks, bosses, quests,
adventurers, achievements) that accumulate across all prestige and
transcendence resets and are never cleared.

- schema: add six new Float fields to the Player model
- prestige route: capture current-run totals and increment lifetime
  fields before resetting per-run counters to zero
- profile route: return lifetime fields as the All Time section data;
  add four new ProfileSettings toggles for visibility control
- ProfilePage: display lifetime bosses/quests/adventurers/achievements
  in All Time section; remove GameProvider dependency by importing
  formatNumber directly (fixes crash on public profile pages)
- EditProfileModal: add four new All Time stat toggles
- types: update Player, ProfileSettings, and PublicProfileResponse
This commit is contained in:
2026-03-07 02:08:41 -08:00
committed by Naomi Carrigan
parent 3cded34f4b
commit 298e1f4604
9 changed files with 213 additions and 39 deletions
+6
View File
@@ -62,6 +62,12 @@ authRouter.get("/callback", async (context) => {
lastSavedAt: player.lastSavedAt,
totalGoldEarned: player.totalGoldEarned,
totalClicks: player.totalClicks,
lifetimeGoldEarned: player.lifetimeGoldEarned,
lifetimeClicks: player.lifetimeClicks,
lifetimeBossesDefeated: player.lifetimeBossesDefeated,
lifetimeQuestsCompleted: player.lifetimeQuestsCompleted,
lifetimeAdventurersRecruited: player.lifetimeAdventurersRecruited,
lifetimeAchievementsUnlocked: player.lifetimeAchievementsUnlocked,
};
const initialState = INITIAL_GAME_STATE(playerShape, playerShape.characterName);