feat: add enchanter disciplines to unlock enchantment effects via perk progression
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m19s

- Add unlocksEffects field to DisciplinePerk type
- Add unlockEffects action to crafting store (deduplicating merge)
- Modify discipline processTick to detect perk thresholds and return unlocked effect IDs
- Wire gameStore tick to pass unlocked effects to crafting store
- Create 8 new enchanter disciplines with tiered effect unlocks:
  Basic/Advanced Weapon, Utility, Mana, Basic/Intermediate/Advanced Spell, Special
- Higher-tier disciplines require prerequisite disciplines
- Add processedPerks tracking to prevent duplicate unlocks
- Split enchanter disciplines into modular files (enchanter, enchanter-utility, enchanter-spells, enchanter-special)
- All tests pass (784/784), no new TS errors, all files under 400 lines
This commit is contained in:
2026-05-23 19:29:45 +02:00
parent 868dfb6225
commit 14f25fffda
11 changed files with 576 additions and 4 deletions
@@ -0,0 +1,107 @@
// ─── Enchanter Utility & Mana Disciplines ──────────────────────────────────────
// Disciplines for unlocking utility and mana enchantment effects
import type { DisciplineDefinition } from '../../types/disciplines';
export const enchanterUtilityDisciplines: DisciplineDefinition[] = [
{
id: 'study-utility-enchantments',
name: 'Study Utility Enchantments',
attunement: 'enchanter',
manaType: 'light',
baseCost: 8,
description: 'Learn to enchant equipment with utility effects.',
statBonus: { stat: 'studySpeed', baseValue: 0.05 },
difficultyFactor: 80,
scalingFactor: 60,
drainBase: 2,
perks: [
{
id: 'utility-meditate',
type: 'once',
threshold: 50,
value: 0,
description: 'Unlock Meditative Focus enchantment',
unlocksEffects: ['meditate_10'],
},
{
id: 'utility-study',
type: 'once',
threshold: 100,
value: 0,
description: 'Unlock Quick Study enchantment',
unlocksEffects: ['study_10'],
},
{
id: 'utility-insight',
type: 'once',
threshold: 150,
value: 0,
description: 'Unlock Insightful enchantment',
unlocksEffects: ['insight_5'],
},
],
},
{
id: 'study-mana-enchantments',
name: 'Study Mana Enchantments',
attunement: 'enchanter',
manaType: 'water',
baseCost: 15,
description: 'Learn to enchant equipment with mana-boosting effects.',
statBonus: { stat: 'maxMana', baseValue: 10 },
difficultyFactor: 150,
scalingFactor: 100,
drainBase: 3,
perks: [
{
id: 'mana-cap-50',
type: 'once',
threshold: 75,
value: 0,
description: 'Unlock Mana Reserve enchantment',
unlocksEffects: ['mana_cap_50'],
},
{
id: 'mana-cap-100',
type: 'once',
threshold: 150,
value: 0,
description: 'Unlock Mana Reservoir enchantment',
unlocksEffects: ['mana_cap_100'],
},
{
id: 'mana-regen-1',
type: 'once',
threshold: 100,
value: 0,
description: 'Unlock Trickle enchantment',
unlocksEffects: ['mana_regen_1'],
},
{
id: 'mana-regen-2',
type: 'once',
threshold: 200,
value: 0,
description: 'Unlock Stream enchantment',
unlocksEffects: ['mana_regen_2'],
},
{
id: 'click-mana-1',
type: 'once',
threshold: 125,
value: 0,
description: 'Unlock Mana Tap enchantment',
unlocksEffects: ['click_mana_1'],
},
{
id: 'click-mana-3',
type: 'once',
threshold: 225,
value: 0,
description: 'Unlock Mana Surge enchantment',
unlocksEffects: ['click_mana_3'],
},
],
},
];