Reward lookups now use the game definitions (defaultBosses, defaultQuests)
as the source of truth rather than reading arrays directly off state
objects. This avoids runtime crashes when state objects are minimal
(e.g. in tests or from old save data) and is more semantically correct.
Adds full test coverage for the new applyUpgradeUnlocks,
applyEquipmentUnlocks, applyStoryUnlocks, and applyAdventurerUnlocks
paths in debug.spec.ts (42 tests, 100% coverage).
The force-unlock debug tool now also corrects three additional categories
of stuck state:
- Upgrades: scans defeated bosses and completed quests for upgrade
rewards and marks those upgrades as unlocked
- Equipment: scans defeated bosses for equipment rewards and marks those
items as owned (without auto-equipping)
- Story chapters: checks every chapter's unlock condition against the
current game state and adds any missing IDs to unlockedChapterIds
The result message in the debug panel now reports all eight corrected
categories.
The force-unlock debug route now scans completed quests for adventurer
rewards and ensures those tiers are marked as unlocked in game state.
The UI and API response type both surface the new adventurersUnlocked
count alongside existing zone/quest/boss/exploration counts.
Closes#88