fix: discipline stat bonuses not applied to max mana and other stats in reactive UI
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m23s

Bug A: useMemo with empty deps in useGameDerived.ts — disciplineEffects
and clickMana were computed once on mount and never recomputed, so the
display always showed bonuses as 0. Fixed by subscribing to discipline
store state and passing disciplineEffects to computeClickMana().

Bug B: autoPaused disciplines excluded from computeDisciplineEffects —
when a discipline auto-paused due to insufficient mana drain, it lost
all its stat bonuses even though it remained active. Fixed by changing
the filter from !disc.autoPaused to !disc.paused, so auto-paused
disciplines keep their earned bonuses (they just stop gaining XP).

Added regression tests in discipline-effects-reactivity.test.ts.
This commit is contained in:
2026-06-15 10:58:44 +02:00
parent 9b559bb9f9
commit a45d38a9c9
6 changed files with 184 additions and 10 deletions
+18 -1
View File
@@ -1,6 +1,6 @@
{
"_meta": {
"generated": "2026-06-14T19:56:35.928Z",
"generated": "2026-06-14T21:49:13.932Z",
"description": "Import dependency graph for src/lib/game. Keys are files, values are arrays of files they import.",
"usage": "To find what a file affects, search for its path in the VALUES. To find what a file depends on, look at its KEY entry."
},
@@ -245,6 +245,9 @@
"data/disciplines/elemental.ts": [
"types/disciplines.ts"
],
"data/disciplines/enchanter-combat.ts": [
"types/disciplines.ts"
],
"data/disciplines/enchanter-special.ts": [
"types/disciplines.ts"
],
@@ -265,6 +268,7 @@
"data/disciplines/elemental-regen-advanced.ts",
"data/disciplines/elemental-regen.ts",
"data/disciplines/elemental.ts",
"data/disciplines/enchanter-combat.ts",
"data/disciplines/enchanter-special.ts",
"data/disciplines/enchanter-spells.ts",
"data/disciplines/enchanter-utility.ts",
@@ -558,6 +562,7 @@
"stores/combat-damage.ts",
"stores/combat-invocation.ts",
"stores/combat-melee.ts",
"stores/combat-room-enchantments.ts",
"stores/combat-state.types.ts",
"stores/dot-runtime.ts",
"stores/golem-combat-actions.ts",
@@ -618,6 +623,14 @@
"utils/index.ts",
"utils/spire-utils.ts"
],
"stores/combat-room-enchantments.ts": [
"data/guardian-encounters.ts",
"effects/discipline-effects.ts",
"stores/combat-state.types.ts",
"stores/craftingStore.ts",
"types.ts",
"utils/room-enchantments-utils.ts"
],
"stores/combat-state.types.ts": [
"types.ts",
"utils/invocation-utils.ts"
@@ -983,6 +996,10 @@
"data/guardian-encounters.ts"
],
"utils/result.ts": [],
"utils/room-enchantments-utils.ts": [
"data/enchantments/special-effects.ts",
"types.ts"
],
"utils/room-utils.ts": [
"constants.ts",
"data/guardian-encounters.ts",