feat: add per-element mana regen disciplines for all 14 mana types
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m26s

- Create data/disciplines/elemental-regen.ts (base + utility elements)
- Create data/disciplines/elemental-regen-advanced.ts (composite + exotic)
- Wire into ALL_DISCIPLINES via index.ts and discipline-slice.ts
- Add perElementRegenBonus to ComputedEffects type
- Merge regen_{element} discipline bonuses in computeAllEffects()
- Apply per-element regen to element mana each tick in gameStore
- Add 'Elemental Regen' and 'Advanced Regen' tabs to DisciplinesTab UI
This commit is contained in:
2026-05-25 12:24:01 +02:00
parent f22ebf1b3b
commit cb78761e95
12 changed files with 317 additions and 2 deletions
@@ -0,0 +1,185 @@
// ─── Elemental Regen Disciplines (Composite + Exotic) ─────────────────────────
// Regen disciplines for composite and exotic mana types.
// All are BASE attunement so they are available to every role once the element is unlocked.
import { DisciplinesAttunementType } from '../../types/disciplines';
import type { DisciplineDefinition } from '../../types/disciplines';
export const elementalRegenAdvancedDisciplines: DisciplineDefinition[] = [
// ── Composite Elements ─────────────────────────────────────────────────────
{
id: 'regen-metal',
name: 'Metal Mana Flow',
attunement: DisciplinesAttunementType.BASE,
manaType: 'metal',
baseCost: 12,
description: 'Attune your metal mana to regenerate passively over time.',
statBonus: { stat: 'regen_metal', baseValue: 0.35 },
difficultyFactor: 160,
scalingFactor: 80,
drainBase: 2,
requires: ['metal'],
perks: [
{
id: 'regen-metal-1',
type: 'once',
threshold: 150,
value: 0,
description: '+0.35 Metal Regen/tick',
},
{
id: 'regen-metal-inf',
type: 'infinite',
threshold: 400,
value: 100,
description: 'Every 100 XP: +0.15 Metal Regen/tick',
},
],
},
{
id: 'regen-sand',
name: 'Sand Mana Flow',
attunement: DisciplinesAttunementType.BASE,
manaType: 'sand',
baseCost: 12,
description: 'Attune your sand mana to regenerate passively over time.',
statBonus: { stat: 'regen_sand', baseValue: 0.35 },
difficultyFactor: 160,
scalingFactor: 80,
drainBase: 2,
requires: ['sand'],
perks: [
{
id: 'regen-sand-1',
type: 'once',
threshold: 150,
value: 0,
description: '+0.35 Sand Regen/tick',
},
{
id: 'regen-sand-inf',
type: 'infinite',
threshold: 400,
value: 100,
description: 'Every 100 XP: +0.15 Sand Regen/tick',
},
],
},
{
id: 'regen-lightning',
name: 'Lightning Mana Flow',
attunement: DisciplinesAttunementType.BASE,
manaType: 'lightning',
baseCost: 12,
description: 'Attune your lightning mana to regenerate passively over time.',
statBonus: { stat: 'regen_lightning', baseValue: 0.35 },
difficultyFactor: 160,
scalingFactor: 80,
drainBase: 2,
requires: ['lightning'],
perks: [
{
id: 'regen-lightning-1',
type: 'once',
threshold: 150,
value: 0,
description: '+0.35 Lightning Regen/tick',
},
{
id: 'regen-lightning-inf',
type: 'infinite',
threshold: 400,
value: 100,
description: 'Every 100 XP: +0.15 Lightning Regen/tick',
},
],
},
// ── Exotic Elements ────────────────────────────────────────────────────────
{
id: 'regen-crystal',
name: 'Crystal Mana Flow',
attunement: DisciplinesAttunementType.BASE,
manaType: 'crystal',
baseCost: 18,
description: 'Attune your crystal mana to regenerate passively over time.',
statBonus: { stat: 'regen_crystal', baseValue: 0.25 },
difficultyFactor: 220,
scalingFactor: 110,
drainBase: 3,
requires: ['crystal'],
perks: [
{
id: 'regen-crystal-1',
type: 'once',
threshold: 200,
value: 0,
description: '+0.25 Crystal Regen/tick',
},
{
id: 'regen-crystal-inf',
type: 'infinite',
threshold: 500,
value: 100,
description: 'Every 100 XP: +0.1 Crystal Regen/tick',
},
],
},
{
id: 'regen-stellar',
name: 'Stellar Mana Flow',
attunement: DisciplinesAttunementType.BASE,
manaType: 'stellar',
baseCost: 18,
description: 'Attune your stellar mana to regenerate passively over time.',
statBonus: { stat: 'regen_stellar', baseValue: 0.25 },
difficultyFactor: 220,
scalingFactor: 110,
drainBase: 3,
requires: ['stellar'],
perks: [
{
id: 'regen-stellar-1',
type: 'once',
threshold: 200,
value: 0,
description: '+0.25 Stellar Regen/tick',
},
{
id: 'regen-stellar-inf',
type: 'infinite',
threshold: 500,
value: 100,
description: 'Every 100 XP: +0.1 Stellar Regen/tick',
},
],
},
{
id: 'regen-void',
name: 'Void Mana Flow',
attunement: DisciplinesAttunementType.BASE,
manaType: 'void',
baseCost: 18,
description: 'Attune your void mana to regenerate passively over time.',
statBonus: { stat: 'regen_void', baseValue: 0.25 },
difficultyFactor: 220,
scalingFactor: 110,
drainBase: 3,
requires: ['void'],
perks: [
{
id: 'regen-void-1',
type: 'once',
threshold: 200,
value: 0,
description: '+0.25 Void Regen/tick',
},
{
id: 'regen-void-inf',
type: 'infinite',
threshold: 500,
value: 100,
description: 'Every 100 XP: +0.1 Void Regen/tick',
},
],
},
];