refactor: Replace natural-regen disciplines with mana conversion speed disciplines
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m25s
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m25s
- Add conversionRate + sourceManaTypes fields to DisciplineDefinition
- Rewrite elemental-regen.ts: 8 base disciplines now convert raw→element
- Rewrite elemental-regen-advanced.ts: 6 composite/exotic disciplines with proper source recipes
- Update discipline-effects.ts: produce conversion entries instead of regen bonuses
- Update gameStore.ts tick: drain source mana types, add to target element
- Update discipline-slice.ts: gate activation on source mana type access
- Update discipline-math.ts: resolve mana type IDs to 'X mana' display names
- Update DisciplinesTab.tsx: show conversion info, source requirements, and lock state
- Update DisciplineDebugSection.tsx: pass elements to activate()
- Update effects.ts: remove regen_{element} merge (no longer produced)
This commit is contained in:
@@ -1,28 +1,38 @@
|
||||
// ─── Elemental Regen Disciplines (Base + Utility) ─────────────────────────────
|
||||
// One discipline per mana type that provides passive regen for that element.
|
||||
// ─── Elemental Conversion Disciplines (Base + Utility) ─────────────────────────
|
||||
// One discipline per mana type that converts raw mana into 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_CONVERSION = 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-', '');
|
||||
function makeBaseConversion(
|
||||
id: string,
|
||||
name: string,
|
||||
manaType: string,
|
||||
cost: number,
|
||||
): DisciplineDefinition {
|
||||
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, label: `${name} Regen/tick` },
|
||||
description: `Convert raw mana into ${name.toLowerCase()} mana over time.`,
|
||||
statBonus: {
|
||||
stat: `conversion_${manaType}` as DisciplineDefinition['statBonus']['stat'],
|
||||
baseValue: BASE_CONVERSION,
|
||||
label: `${name} Conversion/tick`,
|
||||
},
|
||||
difficultyFactor: BASE_DIFF,
|
||||
scalingFactor: BASE_SCALE,
|
||||
drainBase: BASE_DRAIN,
|
||||
conversionRate: BASE_CONVERSION,
|
||||
sourceManaTypes: ['raw' as DisciplineDefinition['manaType']],
|
||||
requires: [manaType],
|
||||
perks: [
|
||||
{
|
||||
@@ -30,16 +40,16 @@ function makeBaseRegen(id: string, name: string, manaType: string, cost: number)
|
||||
type: 'once',
|
||||
threshold: 100,
|
||||
value: 0,
|
||||
description: `+${BASE_REGEN} ${name} Regen/tick`,
|
||||
bonus: { stat: `regen_${shortId}`, amount: BASE_REGEN },
|
||||
description: `+${BASE_CONVERSION} ${name} Conversion/tick`,
|
||||
bonus: { stat: `conversion_${manaType}`, amount: BASE_CONVERSION },
|
||||
},
|
||||
{
|
||||
id: `${id}-inf`,
|
||||
type: 'infinite',
|
||||
threshold: 300,
|
||||
value: 100,
|
||||
description: `Every 100 XP: +0.25 ${name} Regen/tick`,
|
||||
bonus: { stat: `regen_${shortId}`, amount: 0.25 },
|
||||
description: `Every 100 XP: +0.25 ${name} Conversion/tick`,
|
||||
bonus: { stat: `conversion_${manaType}`, amount: 0.25 },
|
||||
},
|
||||
],
|
||||
};
|
||||
@@ -47,13 +57,13 @@ function makeBaseRegen(id: string, name: string, manaType: string, cost: number)
|
||||
|
||||
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),
|
||||
makeBaseConversion('regen-fire', 'Fire', 'fire', 8),
|
||||
makeBaseConversion('regen-water', 'Water', 'water', 8),
|
||||
makeBaseConversion('regen-air', 'Air', 'air', 8),
|
||||
makeBaseConversion('regen-earth', 'Earth', 'earth', 8),
|
||||
makeBaseConversion('regen-light', 'Light', 'light', 8),
|
||||
makeBaseConversion('regen-dark', 'Dark', 'dark', 8),
|
||||
makeBaseConversion('regen-death', 'Death', 'death', 8),
|
||||
|
||||
// ── Utility Element ────────────────────────────────────────────────────────
|
||||
{
|
||||
@@ -62,11 +72,13 @@ export const elementalRegenDisciplines: DisciplineDefinition[] = [
|
||||
attunement: DisciplinesAttunementType.BASE,
|
||||
manaType: 'transference',
|
||||
baseCost: 6,
|
||||
description: 'Attune your transference mana to regenerate passively over time.',
|
||||
statBonus: { stat: 'regen_transference', baseValue: 0.4, label: 'Transference Regen/tick' },
|
||||
description: 'Convert raw mana into transference mana over time.',
|
||||
statBonus: { stat: 'conversion_transference', baseValue: 0.4, label: 'Transference Conversion/tick' },
|
||||
difficultyFactor: 100,
|
||||
scalingFactor: 50,
|
||||
drainBase: 1,
|
||||
conversionRate: 0.4,
|
||||
sourceManaTypes: ['transference'],
|
||||
requires: ['transference'],
|
||||
perks: [
|
||||
{
|
||||
@@ -74,16 +86,16 @@ export const elementalRegenDisciplines: DisciplineDefinition[] = [
|
||||
type: 'once',
|
||||
threshold: 100,
|
||||
value: 0,
|
||||
description: '+0.4 Transference Regen/tick',
|
||||
bonus: { stat: 'regen_transference', amount: 0.4 },
|
||||
description: '+0.4 Transference Conversion/tick',
|
||||
bonus: { stat: 'conversion_transference', amount: 0.4 },
|
||||
},
|
||||
{
|
||||
id: 'regen-transference-inf',
|
||||
type: 'infinite',
|
||||
threshold: 300,
|
||||
value: 100,
|
||||
description: 'Every 100 XP: +0.2 Transference Regen/tick',
|
||||
bonus: { stat: 'regen_transference', amount: 0.2 },
|
||||
description: 'Every 100 XP: +0.2 Transference Conversion/tick',
|
||||
bonus: { stat: 'conversion_transference', amount: 0.2 },
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user