[Medium] [Bug] Mana Conversion: Stats tab uses hardcoded values instead of actual game state #294
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?
Spec: docs/specs/mana-conversion-spec.md §11
Severity: Medium
Problem:
src/components/game/tabs/StatsTab/ElementStatsSection.tsxpasses hardcoded values:meditationMultiplier: 1— always assumes no meditationrawGrossRegen: 2— hardcoded instead of actual computed raw regenThis means pause detection and drain calculations in the stats tab are inaccurate. The stats display should use the actual
baseRegenand meditation state from the game state.Additionally, the cost breakdown (raw cost per unit, component costs, downstream drains, net regen) specified in §11 is not implemented at all.
File:
src/components/game/tabs/StatsTab/ElementStatsSection.tsx:50-51Starting work on this bug. Will read the affected files and the mana-conversion spec §11 to understand the expected behavior.
Fixed. Changes made:
StatsTab.tsx — Now passes
meditationMultiplierandbaseRegenfromuseManaStats()toElementStatsSectionElementStatsSection.tsx — Three fixes:
meditationMultiplier: Now uses the actual computed value from game state instead of hardcoded1rawGrossRegen: Now uses the actualbaseRegenfromcomputeRegen()instead of hardcoded2All 1069 tests pass. No new TypeScript errors introduced.