feat: add titles system with unlock tracking and character sheet display

Titles are earned by reaching milestones (quests, bosses, gold, clicks,
adventurers, guild, prestige, transcendence, apotheosis, achievements,
longevity) and are permanent - never lost on prestige/transcendence/
apotheosis resets. 20 titles available at launch.

Also fixes a pre-existing P2034 write-conflict on the load backfill path
and the exactOptionalPropertyTypes violation in the quest failure handler.
This commit is contained in:
2026-03-07 14:51:30 -08:00
committed by Naomi Carrigan
parent eef807343b
commit b886928e49
13 changed files with 333 additions and 10 deletions
+2 -1
View File
@@ -156,7 +156,8 @@ export const applyTick = (state: GameState, deltaSeconds: number): GameState =>
const failureChance = ZONE_FAILURE_CHANCE[quest.zoneId] ?? 0.20;
if (Math.random() < failureChance) {
return { ...quest, status: "available" as const, startedAt: undefined, lastFailedAt: now };
const { startedAt: _dropped, ...questWithoutStartedAt } = quest;
return { ...questWithoutStartedAt, status: "available" as const, lastFailedAt: now };
}
for (const reward of quest.rewards) {