BUG: Debug panel shows wrong max mana (base 100) instead of actual computed max #242
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug Description
The Mana Debug section in the Debug panel displays an incorrect "max mana" value. It calls
computeMaxMana()with empty parameters (prestigeUpgrades: {}, no effects, no discipline), always returning the base value of 100 regardless of actual game state.This makes it appear that raw mana exceeds the cap (e.g.,
111.8 / 100) when in reality mana is at or below the true max (which includes discipline bonuses, equipment upgrades, and prestige upgrades).Root Cause
Two debug components use a stripped-down
computeMaxMana()call instead of the fullcomputeTotalMaxMana():src/components/game/tabs/DebugTab/GameStateDebugSection.tsx(active panel — lines 91, 227)src/components/game/debug/GameStateDebug.tsx(legacy panel — lines 109, 249)Both pass
{ skills: {}, prestigeUpgrades: {}, skillUpgrades: {}, skillTiers: {} }— always yielding base 100.Expected Behavior
The debug panel's displayed max mana should match the actual max mana used by the game, computed with:
manaWell× 500 per level)maxManaBonusfrom active disciplines likeraw-mastery)maxManaBonusfrom gear)maxManaMultiplier)Impact
Additional Notes
The fix has already been applied in the same branch — this issue is created retroactively for tracking. See the commit message referencing this issue number.