46013a15c8
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)
103 lines
3.7 KiB
TypeScript
103 lines
3.7 KiB
TypeScript
// ─── 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_CONVERSION = 0.5;
|
|
const BASE_DRAIN = 1.5;
|
|
const BASE_DIFF = 120;
|
|
const BASE_SCALE = 60;
|
|
|
|
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: `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: [
|
|
{
|
|
id: `${id}-1`,
|
|
type: 'once',
|
|
threshold: 100,
|
|
value: 0,
|
|
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} Conversion/tick`,
|
|
bonus: { stat: `conversion_${manaType}`, amount: 0.25 },
|
|
},
|
|
],
|
|
};
|
|
}
|
|
|
|
export const elementalRegenDisciplines: DisciplineDefinition[] = [
|
|
// ── Base Elements ──────────────────────────────────────────────────────────
|
|
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 ────────────────────────────────────────────────────────
|
|
{
|
|
id: 'regen-transference',
|
|
name: 'Transference Mana Flow',
|
|
attunement: DisciplinesAttunementType.BASE,
|
|
manaType: 'transference',
|
|
baseCost: 6,
|
|
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: [
|
|
{
|
|
id: 'regen-transference-1',
|
|
type: 'once',
|
|
threshold: 100,
|
|
value: 0,
|
|
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 Conversion/tick',
|
|
bonus: { stat: 'conversion_transference', amount: 0.2 },
|
|
},
|
|
],
|
|
},
|
|
];
|