Bug: Attunement conversion produces free mana — no source mana consumed #218
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 attunement conversion system in the game tick generates element mana (e.g. transference, earth) out of nothing. It adds the converted amount to the target element but never subtracts raw mana (or any source) to pay for the conversion.
Code Location
src/lib/game/stores/gameStore.tslines 165-179:The variable
totalConversionPerTickis only used to reduce effective regen, not to drain raw mana.Impact
Critical — infinite free element mana. Each tick, active attunements generate their primary mana type without costing anything. At enchanter level 10, that's ~7.7 transference per hour, every tick, forever, for free. This completely trivializes the entire element economy and makes the mana conversion system meaningless.
Fix Required
Subtract raw mana equal to the conversion cost before adding the converted element mana:
The conversion cost formula should match the attunement's design (e.g. 1:1 or at some penalty ratio).
Fixed: Attunement conversion now properly deducts raw mana before adding converted element mana. Added rawManaDelta tracking in the attunement conversion loop in gameStore.ts to prevent free element mana generation.