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:
@@ -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',
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
Reference in New Issue
Block a user