fix: adventurer unlocks not applied by force-unlock tool #93

Merged
naomi merged 3 commits from fix/force-unlock-adventurers into main 2026-03-20 10:28:18 -07:00

3 Commits

Author SHA1 Message Date
hikari 212bd2ea27 fix: guard against missing reward arrays in force-unlock helpers
Security Scan and Upload / Security & DefectDojo Upload (pull_request) Successful in 1m2s
CI / Lint, Build & Test (pull_request) Successful in 1m9s
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).
2026-03-20 10:11:15 -07:00
hikari 16c95f4fb3 fix: extend force-unlock to cover upgrades, equipment, and story chapters
CI / Lint, Build & Test (pull_request) Failing after 1m8s
Security Scan and Upload / Security & DefectDojo Upload (pull_request) Successful in 1m10s
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.
2026-03-20 10:00:08 -07:00
hikari 715ccd3fc7 fix: adventurer unlocks not applied by force-unlock tool
Security Scan and Upload / Security & DefectDojo Upload (pull_request) Successful in 1m9s
CI / Lint, Build & Test (pull_request) Failing after 1m13s
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
2026-03-20 09:44:58 -07:00