TASK-007: gameStore.ts still uses old computeEffects(), not new computeStats() #3

Closed
opened 2026-05-12 14:01:02 +02:00 by Anexim · 1 comment
Owner

Runtime Still Uses Old Effect System

The main game tick loop in src/lib/game/stores/gameStore.ts (line ~80-90) still computes effects using the old system:

const effects = computeEffects(skillState.skillUpgrades || {}, skillState.skillTiers || {});

This calls computeEffects() from src/lib/game/upgrade-effects.ts, which reads from SKILL_EVOLUTION_PATHS and the old milestone upgrade system. It does NOT use the new computeStats() from skills-v2.ts.

The new computeStats() in src/lib/game/constants/skills-v2.ts exists with tests passing, but it is never called at runtime. The game loop still:

  1. Uses computeEffects() for upgrade effects
  2. Uses computeMaxMana(), computeRegen(), computeClickMana() from store-modules/computed-stats.ts which bypass computeStats()
  3. Reads individual skill levels directly (e.g., skills.manaWell, skills.manaFlow) instead of going through computeStats()

What needs to happen:

  1. Replace computeEffects() call in gameStore.ts tick loop with computeStats()
  2. Update gameActions.ts createGatherMana() to use computeStats() instead of inline skill reading
  3. Update combat-actions.ts to receive stats from computeStats() instead of reading skills directly
  4. Ensure useManaStats() in gameHooks.ts uses the unified path

Acceptance criteria:

  • gameStore.ts tick function calls computeStats() as the single stat computation entry point
  • No direct reading of individual skill levels for stat computation outside computeStats()
  • All existing tests pass
  • No functional regression in game behavior
## Runtime Still Uses Old Effect System The main game tick loop in `src/lib/game/stores/gameStore.ts` (line ~80-90) still computes effects using the old system: ```typescript const effects = computeEffects(skillState.skillUpgrades || {}, skillState.skillTiers || {}); ``` This calls `computeEffects()` from `src/lib/game/upgrade-effects.ts`, which reads from `SKILL_EVOLUTION_PATHS` and the old milestone upgrade system. It does NOT use the new `computeStats()` from `skills-v2.ts`. The new `computeStats()` in `src/lib/game/constants/skills-v2.ts` exists with tests passing, but it is **never called at runtime**. The game loop still: 1. Uses `computeEffects()` for upgrade effects 2. Uses `computeMaxMana()`, `computeRegen()`, `computeClickMana()` from `store-modules/computed-stats.ts` which bypass `computeStats()` 3. Reads individual skill levels directly (e.g., `skills.manaWell`, `skills.manaFlow`) instead of going through `computeStats()` ### What needs to happen: 1. Replace `computeEffects()` call in `gameStore.ts` tick loop with `computeStats()` 2. Update `gameActions.ts` `createGatherMana()` to use `computeStats()` instead of inline skill reading 3. Update `combat-actions.ts` to receive stats from `computeStats()` instead of reading skills directly 4. Ensure `useManaStats()` in `gameHooks.ts` uses the unified path ### Acceptance criteria: - `gameStore.ts` tick function calls `computeStats()` as the single stat computation entry point - No direct reading of individual skill levels for stat computation outside `computeStats()` - All existing tests pass - No functional regression in game behavior
Anexim added the ai:todo label 2026-05-12 14:01:02 +02:00
n8n-gitea was assigned by Anexim 2026-05-12 14:01:02 +02:00
Author
Owner

Closed and replaced by Issue #15: Migrate Legacy Skills System to Active Disciplines. The old computeEffects/computeStats pipeline is replaced by discipline-effects.ts.

Closed and replaced by Issue #15: Migrate Legacy Skills System to Active Disciplines. The old computeEffects/computeStats pipeline is replaced by discipline-effects.ts.
Anexim removed the ai:todo label 2026-05-18 10:19:21 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Anexim/Mana-Loop#3