fix: bugs #238,#240,#244,#246 + docs #248 update
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m21s
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m21s
- #238: Fix spire tab inconsistent state (Max Floor 1 but Floors Cleared 0) by not inflating maxFloorReached on enterSpireMode and preserving it on exitSpireMode - #240: Fix guardian armor display stray text by extracting stat formatters in SpireSummaryTab - #244: Improve discipline auto-pause UX with log messages and visual feedback on DisciplineCard - #246: Fix raw mana exceeding max cap by recomputing maxMana after discipline XP gains - #248: Update AGENTS.md (remove gitea_get_project_boards, add gitea_start_session, 22 mana types, 8 stores, updated guardian tiers) - #248: Update README.md (remove Prisma/SQLite refs, update mana types/guardian tiers/discipline counts) - #248: Update GAME_BRIEFING.md (8 stores, 22 mana types, 64 disciplines, 8-tier guardians, correct code architecture)
This commit is contained in:
@@ -153,7 +153,7 @@ export const useCombatStore = create<CombatStore>()(
|
||||
},
|
||||
|
||||
exitSpireMode: () => {
|
||||
set({
|
||||
set((s) => ({
|
||||
spireMode: false,
|
||||
currentAction: 'meditate',
|
||||
climbDirection: null,
|
||||
@@ -164,8 +164,9 @@ export const useCombatStore = create<CombatStore>()(
|
||||
currentRoom: generateFloorState(1),
|
||||
castProgress: 0,
|
||||
clearedFloors: {},
|
||||
maxFloorReached: 0,
|
||||
});
|
||||
// Preserve maxFloorReached — don't reset to 0 on spire exit (fix #238)
|
||||
maxFloorReached: Math.max(s.maxFloorReached, 1),
|
||||
}));
|
||||
},
|
||||
|
||||
startClimbUp: () => set({ climbDirection: 'up', currentAction: 'climb' }),
|
||||
@@ -219,7 +220,7 @@ export const useCombatStore = create<CombatStore>()(
|
||||
climbDirection: null,
|
||||
isDescending: false,
|
||||
clearedFloors: {},
|
||||
maxFloorReached: Math.max(s.maxFloorReached, s.currentFloor),
|
||||
// Don't inflate maxFloorReached — it should reflect actual progress (fix #238)
|
||||
}));
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user