Bug: totalManaGathered doesn't count meditation regen mana #217
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
totalManaGatheredstat is used in the insight calculation (totalManaGathered / 500), but it only tracks mana from active clicking (gatherMana) and combat loot. The primary source of mana income — passive meditation regen — is completely uncounted.Code Location
src/lib/game/stores/manaStore.tslines 85-88 and 99-102:addRawManaandgatherManaincrementtotalManaGatheredsrc/lib/game/stores/gameStore.tsline 182: Passive regen adds torawManadirectly without incrementingtotalManaGatheredImpact
Players who primarily gather mana through meditation (the core gameplay loop) get significantly less insight on loop restart than intended. The insight formula expects
totalManaGatheredto represent all mana gained, but meditation-derived mana — which is the majority of income — is excluded.Note
The test in
tick-integration.test.tsline 132 says "expected behavior — totalManaGathered tracks active gathering", suggesting this may be intentional design. If so, the insight formula should be adjusted to not depend ontotalManaGatheredas a measure of "all mana ever gathered."Fix Options
totalManaGathered += effectiveRegen * HOURS_PER_TICKin the tick pipelinerawMana + sum(element.current)instead oftotalManaGatheredfor insight calculationtotalManaGatheredActiveto clarify it only tracks active gatheringFixed: totalManaGathered now counts meditation regen. Also fixes #224 by only counting regen that fits below the mana cap.