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
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:
@@ -1,5 +1,5 @@
|
|||||||
# Circular Dependencies
|
# Circular Dependencies
|
||||||
Generated: 2026-05-25T09:51:15.852Z
|
Generated: 2026-05-25T09:55:36.893Z
|
||||||
Found: 6 circular chain(s) — these MUST be fixed before modifying involved files.
|
Found: 6 circular chain(s) — these MUST be fixed before modifying involved files.
|
||||||
|
|
||||||
1. Processed 132 files (1.5s) (2 warnings)
|
1. Processed 132 files (1.5s) (2 warnings)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"_meta": {
|
"_meta": {
|
||||||
"generated": "2026-05-25T09:51:14.159Z",
|
"generated": "2026-05-25T09:55:35.204Z",
|
||||||
"description": "Import dependency graph for src/lib/game. Keys are files, values are arrays of files they import.",
|
"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."
|
"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."
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -246,6 +246,8 @@ Mana-Loop/
|
|||||||
│ │ ├── data/
|
│ │ ├── data/
|
||||||
│ │ │ ├── disciplines/
|
│ │ │ ├── disciplines/
|
||||||
│ │ │ │ ├── base.ts
|
│ │ │ │ ├── base.ts
|
||||||
|
│ │ │ │ ├── elemental-regen-advanced.ts
|
||||||
|
│ │ │ │ ├── elemental-regen.ts
|
||||||
│ │ │ │ ├── enchanter-special.ts
|
│ │ │ │ ├── enchanter-special.ts
|
||||||
│ │ │ │ ├── enchanter-spells.ts
|
│ │ │ │ ├── enchanter-spells.ts
|
||||||
│ │ │ │ ├── enchanter-utility.ts
|
│ │ │ │ ├── enchanter-utility.ts
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ import React, { useEffect, useState, useCallback } from 'react';
|
|||||||
import { useDisciplineStore } from '@/lib/game/stores/discipline-slice';
|
import { useDisciplineStore } from '@/lib/game/stores/discipline-slice';
|
||||||
import type { DisciplineDefinition } from '@/lib/game/types/disciplines';
|
import type { DisciplineDefinition } from '@/lib/game/types/disciplines';
|
||||||
import { baseDisciplines } from '@/lib/game/data/disciplines/base';
|
import { baseDisciplines } from '@/lib/game/data/disciplines/base';
|
||||||
|
import { elementalRegenDisciplines } from '@/lib/game/data/disciplines/elemental-regen';
|
||||||
|
import { elementalRegenAdvancedDisciplines } from '@/lib/game/data/disciplines/elemental-regen-advanced';
|
||||||
import { enchanterDisciplines } from '@/lib/game/data/disciplines/enchanter';
|
import { enchanterDisciplines } from '@/lib/game/data/disciplines/enchanter';
|
||||||
import { fabricatorDisciplines } from '@/lib/game/data/disciplines/fabricator';
|
import { fabricatorDisciplines } from '@/lib/game/data/disciplines/fabricator';
|
||||||
import { invokerDisciplines } from '@/lib/game/data/disciplines/invoker';
|
import { invokerDisciplines } from '@/lib/game/data/disciplines/invoker';
|
||||||
@@ -18,6 +20,8 @@ interface AttunementTab {
|
|||||||
|
|
||||||
const ATTUNEMENT_TABS: AttunementTab[] = [
|
const ATTUNEMENT_TABS: AttunementTab[] = [
|
||||||
{ key: 'base', label: 'Base', items: baseDisciplines },
|
{ key: 'base', label: 'Base', items: baseDisciplines },
|
||||||
|
{ key: 'elemental-regen', label: 'Elemental Regen', items: elementalRegenDisciplines },
|
||||||
|
{ key: 'elemental-regen-advanced', label: 'Advanced Regen', items: elementalRegenAdvancedDisciplines },
|
||||||
{ key: 'enchanter', label: 'Enchanter', items: enchanterDisciplines },
|
{ key: 'enchanter', label: 'Enchanter', items: enchanterDisciplines },
|
||||||
{ key: 'fabricator', label: 'Fabricator', items: fabricatorDisciplines },
|
{ key: 'fabricator', label: 'Fabricator', items: fabricatorDisciplines },
|
||||||
{ key: 'invoker', label: 'Invoker', items: invokerDisciplines },
|
{ key: 'invoker', label: 'Invoker', items: invokerDisciplines },
|
||||||
|
|||||||
@@ -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',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
];
|
||||||
@@ -0,0 +1,86 @@
|
|||||||
|
// ─── Elemental Regen Disciplines (Base + Utility) ─────────────────────────────
|
||||||
|
// One discipline per mana type that provides passive regen for that element.
|
||||||
|
// 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';
|
||||||
|
|
||||||
|
const BASE_REGEN = 0.5;
|
||||||
|
const BASE_DRAIN = 1.5;
|
||||||
|
const BASE_DIFF = 120;
|
||||||
|
const BASE_SCALE = 60;
|
||||||
|
|
||||||
|
function makeBaseRegen(id: string, name: string, manaType: string, cost: number): DisciplineDefinition {
|
||||||
|
const shortId = id.replace('regen-', '');
|
||||||
|
return {
|
||||||
|
id,
|
||||||
|
name: `${name} Mana Flow`,
|
||||||
|
attunement: DisciplinesAttunementType.BASE,
|
||||||
|
manaType: manaType as DisciplineDefinition['manaType'],
|
||||||
|
baseCost: cost,
|
||||||
|
description: `Attune your ${name.toLowerCase()} mana to regenerate passively over time.`,
|
||||||
|
statBonus: { stat: `regen_${shortId}` as DisciplineDefinition['statBonus']['stat'], baseValue: BASE_REGEN },
|
||||||
|
difficultyFactor: BASE_DIFF,
|
||||||
|
scalingFactor: BASE_SCALE,
|
||||||
|
drainBase: BASE_DRAIN,
|
||||||
|
requires: [manaType],
|
||||||
|
perks: [
|
||||||
|
{
|
||||||
|
id: `${id}-1`,
|
||||||
|
type: 'once',
|
||||||
|
threshold: 100,
|
||||||
|
value: 0,
|
||||||
|
description: `+${BASE_REGEN} ${name} Regen/tick`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: `${id}-inf`,
|
||||||
|
type: 'infinite',
|
||||||
|
threshold: 300,
|
||||||
|
value: 100,
|
||||||
|
description: `Every 100 XP: +0.25 ${name} Regen/tick`,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export const elementalRegenDisciplines: DisciplineDefinition[] = [
|
||||||
|
// ── Base Elements ──────────────────────────────────────────────────────────
|
||||||
|
makeBaseRegen('regen-fire', 'Fire', 'fire', 8),
|
||||||
|
makeBaseRegen('regen-water', 'Water', 'water', 8),
|
||||||
|
makeBaseRegen('regen-air', 'Air', 'air', 8),
|
||||||
|
makeBaseRegen('regen-earth', 'Earth', 'earth', 8),
|
||||||
|
makeBaseRegen('regen-light', 'Light', 'light', 8),
|
||||||
|
makeBaseRegen('regen-dark', 'Dark', 'dark', 8),
|
||||||
|
makeBaseRegen('regen-death', 'Death', 'death', 8),
|
||||||
|
|
||||||
|
// ── Utility Element ────────────────────────────────────────────────────────
|
||||||
|
{
|
||||||
|
id: 'regen-transference',
|
||||||
|
name: 'Transference Mana Flow',
|
||||||
|
attunement: DisciplinesAttunementType.BASE,
|
||||||
|
manaType: 'transference',
|
||||||
|
baseCost: 6,
|
||||||
|
description: 'Attune your transference mana to regenerate passively over time.',
|
||||||
|
statBonus: { stat: 'regen_transference', baseValue: 0.4 },
|
||||||
|
difficultyFactor: 100,
|
||||||
|
scalingFactor: 50,
|
||||||
|
drainBase: 1,
|
||||||
|
requires: ['transference'],
|
||||||
|
perks: [
|
||||||
|
{
|
||||||
|
id: 'regen-transference-1',
|
||||||
|
type: 'once',
|
||||||
|
threshold: 100,
|
||||||
|
value: 0,
|
||||||
|
description: '+0.4 Transference Regen/tick',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'regen-transference-inf',
|
||||||
|
type: 'infinite',
|
||||||
|
threshold: 300,
|
||||||
|
value: 100,
|
||||||
|
description: 'Every 100 XP: +0.2 Transference Regen/tick',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
];
|
||||||
@@ -2,6 +2,8 @@
|
|||||||
// Aggregates all discipline definitions into a single ALL_DISCIPLINES array
|
// Aggregates all discipline definitions into a single ALL_DISCIPLINES array
|
||||||
|
|
||||||
import { baseDisciplines } from './base';
|
import { baseDisciplines } from './base';
|
||||||
|
import { elementalRegenDisciplines } from './elemental-regen';
|
||||||
|
import { elementalRegenAdvancedDisciplines } from './elemental-regen-advanced';
|
||||||
import { enchanterDisciplines } from './enchanter';
|
import { enchanterDisciplines } from './enchanter';
|
||||||
import { enchanterUtilityDisciplines } from './enchanter-utility';
|
import { enchanterUtilityDisciplines } from './enchanter-utility';
|
||||||
import { enchanterSpellDisciplines } from './enchanter-spells';
|
import { enchanterSpellDisciplines } from './enchanter-spells';
|
||||||
@@ -12,6 +14,8 @@ import type { DisciplineDefinition } from '../../types/disciplines';
|
|||||||
|
|
||||||
export const ALL_DISCIPLINES: DisciplineDefinition[] = [
|
export const ALL_DISCIPLINES: DisciplineDefinition[] = [
|
||||||
...baseDisciplines,
|
...baseDisciplines,
|
||||||
|
...elementalRegenDisciplines,
|
||||||
|
...elementalRegenAdvancedDisciplines,
|
||||||
...enchanterDisciplines,
|
...enchanterDisciplines,
|
||||||
...enchanterUtilityDisciplines,
|
...enchanterUtilityDisciplines,
|
||||||
...enchanterSpellDisciplines,
|
...enchanterSpellDisciplines,
|
||||||
@@ -21,6 +25,8 @@ export const ALL_DISCIPLINES: DisciplineDefinition[] = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
export { baseDisciplines } from './base';
|
export { baseDisciplines } from './base';
|
||||||
|
export { elementalRegenDisciplines } from './elemental-regen';
|
||||||
|
export { elementalRegenAdvancedDisciplines } from './elemental-regen-advanced';
|
||||||
export { enchanterDisciplines } from './enchanter';
|
export { enchanterDisciplines } from './enchanter';
|
||||||
export { enchanterUtilityDisciplines } from './enchanter-utility';
|
export { enchanterUtilityDisciplines } from './enchanter-utility';
|
||||||
export { enchanterSpellDisciplines } from './enchanter-spells';
|
export { enchanterSpellDisciplines } from './enchanter-spells';
|
||||||
|
|||||||
@@ -94,6 +94,15 @@ export function computeAllEffects(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Merge per-element regen from discipline effects (regen_{element})
|
||||||
|
const perElementRegenBonus: Record<string, number> = { ...upgradeEffects.perElementRegenBonus };
|
||||||
|
for (const [key, value] of Object.entries(disciplineEffects.bonuses)) {
|
||||||
|
if (key.startsWith('regen_') && key !== 'regenBonus') {
|
||||||
|
const element = key.replace('regen_', '');
|
||||||
|
perElementRegenBonus[element] = (perElementRegenBonus[element] || 0) + value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const merged: UnifiedEffects = {
|
const merged: UnifiedEffects = {
|
||||||
...upgradeEffects,
|
...upgradeEffects,
|
||||||
maxManaBonus: upgradeEffects.maxManaBonus + (equipmentEffects.bonuses.maxMana || 0) + (disciplineEffects.bonuses.maxManaBonus || 0),
|
maxManaBonus: upgradeEffects.maxManaBonus + (equipmentEffects.bonuses.maxMana || 0) + (disciplineEffects.bonuses.maxManaBonus || 0),
|
||||||
@@ -102,6 +111,7 @@ export function computeAllEffects(
|
|||||||
baseDamageBonus: upgradeEffects.baseDamageBonus + (equipmentEffects.bonuses.baseDamage || 0) + (disciplineEffects.bonuses.baseDamageBonus || 0),
|
baseDamageBonus: upgradeEffects.baseDamageBonus + (equipmentEffects.bonuses.baseDamage || 0) + (disciplineEffects.bonuses.baseDamageBonus || 0),
|
||||||
elementCapBonus: upgradeEffects.elementCapBonus + (equipmentEffects.bonuses.elementCap || 0) + (disciplineEffects.bonuses.elementCapBonus || 0),
|
elementCapBonus: upgradeEffects.elementCapBonus + (equipmentEffects.bonuses.elementCap || 0) + (disciplineEffects.bonuses.elementCapBonus || 0),
|
||||||
perElementCapBonus,
|
perElementCapBonus,
|
||||||
|
perElementRegenBonus,
|
||||||
maxManaMultiplier: upgradeEffects.maxManaMultiplier * (equipmentEffects.multipliers.maxMana || 1),
|
maxManaMultiplier: upgradeEffects.maxManaMultiplier * (equipmentEffects.multipliers.maxMana || 1),
|
||||||
regenMultiplier: upgradeEffects.regenMultiplier * (equipmentEffects.multipliers.regen || 1),
|
regenMultiplier: upgradeEffects.regenMultiplier * (equipmentEffects.multipliers.regen || 1),
|
||||||
clickManaMultiplier: upgradeEffects.clickManaMultiplier * (equipmentEffects.multipliers.clickMana || 1),
|
clickManaMultiplier: upgradeEffects.clickManaMultiplier * (equipmentEffects.multipliers.clickMana || 1),
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ export function computeEffects(
|
|||||||
elementCapMultiplier: 1,
|
elementCapMultiplier: 1,
|
||||||
elementCapBonus: 0,
|
elementCapBonus: 0,
|
||||||
perElementCapBonus: {},
|
perElementCapBonus: {},
|
||||||
|
perElementRegenBonus: {},
|
||||||
conversionCostMultiplier: 1,
|
conversionCostMultiplier: 1,
|
||||||
doubleCraftChance: 0,
|
doubleCraftChance: 0,
|
||||||
permanentRegenBonus: 0,
|
permanentRegenBonus: 0,
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ export interface ComputedEffects {
|
|||||||
elementCapMultiplier: number;
|
elementCapMultiplier: number;
|
||||||
elementCapBonus: number;
|
elementCapBonus: number;
|
||||||
perElementCapBonus: Record<string, number>;
|
perElementCapBonus: Record<string, number>;
|
||||||
|
perElementRegenBonus: Record<string, number>;
|
||||||
conversionCostMultiplier: number;
|
conversionCostMultiplier: number;
|
||||||
doubleCraftChance: number;
|
doubleCraftChance: number;
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ import {
|
|||||||
getUnlockedPerks,
|
getUnlockedPerks,
|
||||||
} from '../utils/discipline-math';
|
} from '../utils/discipline-math';
|
||||||
import { baseDisciplines } from '../data/disciplines/base';
|
import { baseDisciplines } from '../data/disciplines/base';
|
||||||
|
import { elementalRegenDisciplines } from '../data/disciplines/elemental-regen';
|
||||||
|
import { elementalRegenAdvancedDisciplines } from '../data/disciplines/elemental-regen-advanced';
|
||||||
import { enchanterDisciplines } from '../data/disciplines/enchanter';
|
import { enchanterDisciplines } from '../data/disciplines/enchanter';
|
||||||
import { enchanterUtilityDisciplines } from '../data/disciplines/enchanter-utility';
|
import { enchanterUtilityDisciplines } from '../data/disciplines/enchanter-utility';
|
||||||
import { enchanterSpellDisciplines } from '../data/disciplines/enchanter-spells';
|
import { enchanterSpellDisciplines } from '../data/disciplines/enchanter-spells';
|
||||||
@@ -21,6 +23,8 @@ import { MAX_CONCURRENT_DISCIPLINES } from '../types/disciplines';
|
|||||||
|
|
||||||
const ALL_DISCIPLINES = [
|
const ALL_DISCIPLINES = [
|
||||||
...baseDisciplines,
|
...baseDisciplines,
|
||||||
|
...elementalRegenDisciplines,
|
||||||
|
...elementalRegenAdvancedDisciplines,
|
||||||
...enchanterDisciplines,
|
...enchanterDisciplines,
|
||||||
...enchanterUtilityDisciplines,
|
...enchanterUtilityDisciplines,
|
||||||
...enchanterSpellDisciplines,
|
...enchanterSpellDisciplines,
|
||||||
|
|||||||
@@ -267,6 +267,22 @@ export const useGameStore = create<GameCoordinatorStore>()(
|
|||||||
rawMana = disciplineResult.rawMana;
|
rawMana = disciplineResult.rawMana;
|
||||||
elements = disciplineResult.elements;
|
elements = disciplineResult.elements;
|
||||||
|
|
||||||
|
// Apply per-element regen from discipline effects (regen_{element})
|
||||||
|
for (const [key, value] of Object.entries(disciplineEffects.bonuses)) {
|
||||||
|
if (key.startsWith('regen_') && key !== 'regenBonus') {
|
||||||
|
const element = key.replace('regen_', '');
|
||||||
|
if (elements[element]) {
|
||||||
|
elements[element] = {
|
||||||
|
...elements[element],
|
||||||
|
current: Math.min(
|
||||||
|
elements[element].max,
|
||||||
|
elements[element].current + value * HOURS_PER_TICK,
|
||||||
|
),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Unlock enchantment effects from newly unlocked discipline perks
|
// Unlock enchantment effects from newly unlocked discipline perks
|
||||||
if (disciplineResult.unlockedEffects.length > 0) {
|
if (disciplineResult.unlockedEffects.length > 0) {
|
||||||
useCraftingStore.getState().unlockEffects(disciplineResult.unlockedEffects);
|
useCraftingStore.getState().unlockEffects(disciplineResult.unlockedEffects);
|
||||||
|
|||||||
Reference in New Issue
Block a user