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
+8 -2
View File
@@ -18,8 +18,14 @@ model Player {
profileSettings Json?
createdAt Float
lastSavedAt Float
totalGoldEarned Float @default(0)
totalClicks Float @default(0)
totalGoldEarned Float @default(0)
totalClicks Float @default(0)
lifetimeGoldEarned Float @default(0)
lifetimeClicks Float @default(0)
lifetimeBossesDefeated Float @default(0)
lifetimeQuestsCompleted Float @default(0)
lifetimeAdventurersRecruited Float @default(0)
lifetimeAchievementsUnlocked Float @default(0)
}
model GameState {