BUG: Debug panel shows wrong max mana (base 100) instead of actual computed max #242

Closed
opened 2026-06-01 09:53:44 +02:00 by Anexim · 0 comments
Owner

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 full computeTotalMaxMana():

  • 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:

  • Prestige upgrades (manaWell × 500 per level)
  • Discipline bonuses (maxManaBonus from active disciplines like raw-mastery)
  • Equipment enchantment bonuses (maxManaBonus from gear)
  • Multiplicative effects (maxManaMultiplier)

Impact

  • Misleading debug info can cause false bug reports (see #237)
  • "Fill Mana" button in debug fills to wrong value (100 instead of actual max)

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.

## 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 full `computeTotalMaxMana()`: - `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: - Prestige upgrades (`manaWell` × 500 per level) - Discipline bonuses (`maxManaBonus` from active disciplines like `raw-mastery`) - Equipment enchantment bonuses (`maxManaBonus` from gear) - Multiplicative effects (`maxManaMultiplier`) ## Impact - Misleading debug info can cause false bug reports (see #237) - "Fill Mana" button in debug fills to wrong value (100 instead of actual max) ## 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.
Anexim added the ai:todo label 2026-06-01 09:53:44 +02:00
n8n-gitea was assigned by Anexim 2026-06-01 09:53:44 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Anexim/Mana-Loop#242