[priority: high] Missing mana regen disciplines for each mana type #130

Closed
opened 2026-05-25 11:36:12 +02:00 by Anexim · 2 comments
Owner

Feature: No mana regen disciplines exist for individual mana types

Description

According to the game design, there should be a mana regen discipline for each mana type (once that mana type is unlocked). Currently, there are zero disciplines that provide mana regeneration bonuses for any specific element.

Current State

Looking at all discipline data files:

  • data/disciplines/base.ts — Raw Mana Mastery (maxManaBonus), Elemental Attunement (elementCap_fire)
  • data/disciplines/enchanter.ts — Enchantment Crafting, Mana Channeling, Study Basic/Advanced Weapon Enchantments
  • data/disciplines/enchanter-utility.ts — Study Utility Enchantments, Study Mana Enchantments
  • data/disciplines/enchanter-spells.ts — Study Basic/Intermediate/Advanced Spell Enchantments
  • data/disciplines/enchanter-special.ts — Study Special Enchantments
  • data/disciplines/fabricator.ts — Golem Crafting, Crafting Efficiency
  • data/disciplines/invoker.ts — Spell Casting, Void Manipulation

None of these provide regen bonuses for specific mana types. The only regen-related stat is regenBonus (generic) in the effects system.

Expected Behavior

For each mana type (fire, water, air, earth, light, dark, death, transference, metal, sand, lightning, crystal, stellar, void), there should be a discipline that:

  • Has a statBonus.stat like regen_fire, regen_water, etc.
  • Is gated behind unlocking that mana type
  • Provides a meaningful regen bonus for that specific element

Files Involved

  • src/lib/game/data/disciplines/base.ts — could host the pattern
  • New discipline data files may be needed (e.g., data/disciplines/elemental-regen.ts)
  • src/lib/game/data/disciplines/index.ts — needs to export new disciplines
  • src/lib/game/effects/discipline-effects.ts — may need to handle regen_{element} stat keys
  • src/lib/game/effects.tscomputeAllEffects() may need to merge per-element regen

Design Notes

  • These could be grouped under a new "Elemental Regen" sub-tab or added to the Base tab
  • Each discipline should require the corresponding element to be unlocked
  • The requires field on DisciplineDefinition could gate these behind element unlocks
  • Consider: should these be in the Base tab (available to all) or in a new "Mana Types" tab?
## Feature: No mana regen disciplines exist for individual mana types ### Description According to the game design, there should be a mana regen discipline for each mana type (once that mana type is unlocked). Currently, there are **zero** disciplines that provide mana regeneration bonuses for any specific element. ### Current State Looking at all discipline data files: - `data/disciplines/base.ts` — Raw Mana Mastery (maxManaBonus), Elemental Attunement (elementCap_fire) - `data/disciplines/enchanter.ts` — Enchantment Crafting, Mana Channeling, Study Basic/Advanced Weapon Enchantments - `data/disciplines/enchanter-utility.ts` — Study Utility Enchantments, Study Mana Enchantments - `data/disciplines/enchanter-spells.ts` — Study Basic/Intermediate/Advanced Spell Enchantments - `data/disciplines/enchanter-special.ts` — Study Special Enchantments - `data/disciplines/fabricator.ts` — Golem Crafting, Crafting Efficiency - `data/disciplines/invoker.ts` — Spell Casting, Void Manipulation None of these provide `regen` bonuses for specific mana types. The only regen-related stat is `regenBonus` (generic) in the effects system. ### Expected Behavior For each mana type (fire, water, air, earth, light, dark, death, transference, metal, sand, lightning, crystal, stellar, void), there should be a discipline that: - Has a `statBonus.stat` like `regen_fire`, `regen_water`, etc. - Is gated behind unlocking that mana type - Provides a meaningful regen bonus for that specific element ### Files Involved - `src/lib/game/data/disciplines/base.ts` — could host the pattern - New discipline data files may be needed (e.g., `data/disciplines/elemental-regen.ts`) - `src/lib/game/data/disciplines/index.ts` — needs to export new disciplines - `src/lib/game/effects/discipline-effects.ts` — may need to handle `regen_{element}` stat keys - `src/lib/game/effects.ts` — `computeAllEffects()` may need to merge per-element regen ### Design Notes - These could be grouped under a new "Elemental Regen" sub-tab or added to the Base tab - Each discipline should require the corresponding element to be unlocked - The `requires` field on `DisciplineDefinition` could gate these behind element unlocks - Consider: should these be in the Base tab (available to all) or in a new "Mana Types" tab?
Anexim added the ai:todo label 2026-05-25 11:36:12 +02:00
n8n-gitea was assigned by Anexim 2026-05-25 11:36:12 +02:00
Author
Owner

Starting implementation of per-element mana regen disciplines. Plan:

  1. Create data/disciplines/elemental-regen.ts with regen disciplines for all 14 non-raw mana types
  2. Wire into ALL_DISCIPLINES via index.ts and discipline-slice.ts
  3. Update effects system to handle regen_{element} stat keys
  4. Apply per-element regen in the game tick loop
  5. Add "Elemental Regen" tab to DisciplinesTab UI
  6. Test and verify
Starting implementation of per-element mana regen disciplines. Plan: 1. Create `data/disciplines/elemental-regen.ts` with regen disciplines for all 14 non-raw mana types 2. Wire into `ALL_DISCIPLINES` via index.ts and discipline-slice.ts 3. Update effects system to handle `regen_{element}` stat keys 4. Apply per-element regen in the game tick loop 5. Add "Elemental Regen" tab to DisciplinesTab UI 6. Test and verify
Author
Owner

Implemented per-element mana regen disciplines for all 14 non-raw mana types.

Files changed (12):

  • data/disciplines/elemental-regen.ts — 8 base/utility element regen disciplines (fire, water, air, earth, light, dark, death, transference)
  • data/disciplines/elemental-regen-advanced.ts — 6 composite/exotic regen disciplines (metal, sand, lightning, crystal, stellar, void)
  • data/disciplines/index.ts — wired into ALL_DISCIPLINES
  • stores/discipline-slice.ts — included in local ALL_DISCIPLINES/DISCIPLINE_MAP
  • effects/upgrade-effects.types.ts — added perElementRegenBonus to ComputedEffects
  • effects/upgrade-effects.ts — initialized perElementRegenBonus: {}
  • effects.ts — merged regen_{element} discipline bonuses into unified effects
  • stores/gameStore.ts — applied per-element regen to element mana each tick
  • components/game/tabs/DisciplinesTab.tsx — added "Elemental Regen" and "Advanced Regen" tabs

Design:

  • Each discipline provides regen_{element} stat bonus via the existing statBonus system
  • Scaling: baseValue * (XP / scalingFactor)^0.65 — same formula as all disciplines
  • Base elements: 0.5 base regen, composite: 0.35, exotic: 0.25 (harder to sustain)
  • Each discipline drains its own mana type while active (cost scales with XP)
  • All are BASE attunement, gated behind element unlock via requires field
  • Per-element regen applied in tick after discipline drain, capped at element max
✅ Implemented per-element mana regen disciplines for all 14 non-raw mana types. **Files changed (12):** - `data/disciplines/elemental-regen.ts` — 8 base/utility element regen disciplines (fire, water, air, earth, light, dark, death, transference) - `data/disciplines/elemental-regen-advanced.ts` — 6 composite/exotic regen disciplines (metal, sand, lightning, crystal, stellar, void) - `data/disciplines/index.ts` — wired into ALL_DISCIPLINES - `stores/discipline-slice.ts` — included in local ALL_DISCIPLINES/DISCIPLINE_MAP - `effects/upgrade-effects.types.ts` — added `perElementRegenBonus` to ComputedEffects - `effects/upgrade-effects.ts` — initialized `perElementRegenBonus: {}` - `effects.ts` — merged `regen_{element}` discipline bonuses into unified effects - `stores/gameStore.ts` — applied per-element regen to element mana each tick - `components/game/tabs/DisciplinesTab.tsx` — added "Elemental Regen" and "Advanced Regen" tabs **Design:** - Each discipline provides `regen_{element}` stat bonus via the existing statBonus system - Scaling: `baseValue * (XP / scalingFactor)^0.65` — same formula as all disciplines - Base elements: 0.5 base regen, composite: 0.35, exotic: 0.25 (harder to sustain) - Each discipline drains its own mana type while active (cost scales with XP) - All are BASE attunement, gated behind element unlock via `requires` field - Per-element regen applied in tick after discipline drain, capped at element max
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Anexim/Mana-Loop#130