Prestige Store:
- Convert doPrestige() to return Result<void> with specific error codes
(INVALID_PRESTIGE_ID, PRESTIGE_MAX_LEVEL, INSUFFICIENT_INSIGHT)
- Convert startPactRitual() to return Result<void> with specific error codes
(GUARDIAN_NOT_DEFEATED, PACT_ALREADY_SIGNED, PACT_SLOTS_FULL,
INSUFFICIENT_MANA, RITUAL_IN_PROGRESS)
Combat Actions:
- Add try/catch wrapper inside processCombatTick with safe fallback defaults
- Add makeDefaultCombatTickResult helper for error recovery
LocalStorage Error Handling:
- Create safe-persist.ts utility wrapping localStorage with error handling
(corrupted JSON, quota exceeded, unexpected failures)
- Update all 8 Zustand stores to use createSafeStorage() in persist middleware
UI Updates:
- Update GuardianPactsTab to use Result pattern for ritual error messages
Tests:
- Update store-actions-combat-prestige.test.ts for Result return types
- Update store-actions.test.ts ManaStore tests for Result pattern
- Remove duplicate Prestige/Discipline sections from store-actions.test.ts
- All files under 400 line limit
601 tests pass (3 pre-existing failures in spire-utils.test.ts)
- Issue 83: Mana Tide pulse factor now ranges 0.5x-1.5x (was 0.5x-1.0x)
- Issue 82: SteadyStream no longer returns early like EternalFlow; only skips incursion penalty
- Issue 81: Prestige store partialize now includes defeatedGuardians, signedPacts, signedPactDetails, pactRitualFloor, pactRitualProgress, loopInsight, pactSlots
- Issue 80: Combat store partialize now includes floorHP, floorMaxHP, castProgress, spireMode, clearedFloors, golemancy, equipmentSpellStates, activityLog, achievements
- Issue 78: cancelDesign now always cancels designProgress first, then designProgress2
- Issue 79: startDesigningEnchantment now uses designProgress2 when designProgress is occupied
Added 13 regression tests in src/lib/game/__tests__/regression-fixes.test.ts
Refactored craftingStore types to craftingStore.types.ts to stay under 400-line limit
Priority 4 fixes:
- #50: getUnlockedAttunements filter now only returns active attunements
- #48: doPrestige return type changed from void to boolean
- #47: ConfirmDialog now catches and displays async errors from onConfirm
- #46: GameStateDebug Fill Mana now uses direct setState instead of loop
- #55: DisciplinesTab statBonus/baseValue props verified correct
- #56: DisciplinesTab tab filtering verified working
Priority 3 fixes:
- #45: drain spell description changed from 'life force' to 'vital energy'
- #44: removed banned 'ascension' skill category
- #43: renamed lifeEssenceDrop to vitalityEssenceDrop
- #42: pactMaster achievement requirement changed from 12 to 9
- #40: golems/utils.ts and equipment/utils.ts now import from index
- #39: removed duplicate RoomType from constants/rooms.ts
- #38: consolidated EquipmentSlot type in types/equipmentSlot.ts
- #37: removed duplicate EnchantmentEffectDef from spell-effects/types.ts
- #36: renamed RARITY_COLORS in loot-drops.ts to LOOT_RARITY_COLORS