"Max meditation multiplier starts at 5x instead of 2.5x" #231

Closed
opened 2026-05-31 10:17:52 +02:00 by Anexim · 2 comments
Owner

Description: The meditation multiplier formula starts at 1x (correct) but the cap is hardcoded at 5.0 in getMeditationBonus(). The design intent is:

  • Base cap: 2.5x (without any discipline perks)
  • Mana Circulation perk adds +0.5 per tier (7 tiers, up to +3.5)
  • Maximum reachable cap: 2.5 + 3.5 = 6.0x

Root Cause:

In src/lib/game/utils/mana-utils.ts, the getMeditationBonus function has:

const maxMultiplier = 5.0 + disciplineMeditationCap;

This means:

  • Starting cap is 5.0x instead of 2.5x
  • With full Mana Circulation perks (+3.5), cap goes to 8.5x instead of 6.0x

Files involved:

  • src/lib/game/utils/mana-utils.tsgetMeditationBonus() function, line ~117

Fix: Change the base cap from 5.0 to 2.5:

const maxMultiplier = 2.5 + disciplineMeditationCap;

Impact: This is a one-line math fix. It affects:

  • src/app/page.tsxuseGameDerivedStats() uses getMeditationBonus()
  • src/app/components/LeftPanel.tsx — also uses getMeditationBonus()
  • src/components/game/ManaDisplay.tsx — displays the multiplier
  • src/lib/game/hooks/useGameDerived.ts — also computes meditation multiplier
  • src/lib/game/stores/gameStore.ts — tick pipeline uses it too
  • Existing tests in mana-utils.test.ts and computed-stats.test.ts may need updated expected values

AGENTS.md rules: All fixes must keep files under 400 lines.

**Description:** The meditation multiplier formula starts at 1x (correct) but the cap is hardcoded at `5.0` in `getMeditationBonus()`. The design intent is: - Base cap: **2.5x** (without any discipline perks) - Mana Circulation perk adds +0.5 per tier (7 tiers, up to +3.5) - Maximum reachable cap: 2.5 + 3.5 = **6.0x** **Root Cause:** In `src/lib/game/utils/mana-utils.ts`, the `getMeditationBonus` function has: ```ts const maxMultiplier = 5.0 + disciplineMeditationCap; ``` This means: - Starting cap is 5.0x instead of 2.5x - With full Mana Circulation perks (+3.5), cap goes to 8.5x instead of 6.0x **Files involved:** - `src/lib/game/utils/mana-utils.ts` — `getMeditationBonus()` function, line ~117 **Fix:** Change the base cap from `5.0` to `2.5`: ```ts const maxMultiplier = 2.5 + disciplineMeditationCap; ``` **Impact:** This is a one-line math fix. It affects: - `src/app/page.tsx` — `useGameDerivedStats()` uses `getMeditationBonus()` - `src/app/components/LeftPanel.tsx` — also uses `getMeditationBonus()` - `src/components/game/ManaDisplay.tsx` — displays the multiplier - `src/lib/game/hooks/useGameDerived.ts` — also computes meditation multiplier - `src/lib/game/stores/gameStore.ts` — tick pipeline uses it too - Existing tests in `mana-utils.test.ts` and `computed-stats.test.ts` may need updated expected values **AGENTS.md rules:** All fixes must keep files under 400 lines.
Anexim added the ai:todo label 2026-05-31 10:17:52 +02:00
n8n-gitea was assigned by Anexim 2026-05-31 10:17:52 +02:00
Author
Owner

Starting work on the meditation multiplier fix. Changing base cap from 5.0 to 2.5 in getMeditationBonus().

Starting work on the meditation multiplier fix. Changing base cap from 5.0 to 2.5 in getMeditationBonus().
Author
Owner

Fixed meditation multiplier base cap from 5.0 to 2.5 in getMeditationBonus(). Updated 3 test expectations across mana-utils.test.ts and computed-stats.test.ts. All 62 tests pass.

Fixed meditation multiplier base cap from 5.0 to 2.5 in getMeditationBonus(). Updated 3 test expectations across mana-utils.test.ts and computed-stats.test.ts. All 62 tests pass.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Anexim/Mana-Loop#231