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
+8
View File
@@ -267,6 +267,14 @@ export const useGameStore = create<GameCoordinatorStore>()(
rawMana = disciplineResult.rawMana;
elements = disciplineResult.elements;
// Unlock enchantment effects from newly unlocked discipline perks
if (disciplineResult.unlockedEffects.length > 0) {
useCraftingStore.getState().unlockEffects(disciplineResult.unlockedEffects);
for (const effectId of disciplineResult.unlockedEffects) {
addLog(`✨ Discipline insight unlocked: ${effectId}`);
}
}
// Combat — delegate to combatStore
if (ctx.combat.currentAction === 'climb') {
const combatResult = useCombatStore.getState().processCombatTick(