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
+15
View File
@@ -335,6 +335,21 @@ export const useCraftingStore = create<CraftingStore>()(
unequipItem: (slot: EquipmentSlot) => {
unequipItemAction(slot, set);
},
unlockEffects: (effectIds: string[]) => {
set((state) => {
const existing = new Set(state.unlockedEffects);
let changed = false;
for (const id of effectIds) {
if (!existing.has(id)) {
existing.add(id);
changed = true;
}
}
if (!changed) return state;
return { unlockedEffects: Array.from(existing) };
});
},
};
},
{