feat: add fabricator disciplines for recipe unlocks
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m21s

- Add unlocksRecipes field to DisciplinePerk type
- Add study-fabricator-recipes discipline (earth/metal/sand/crystal recipes)
- Add study-wizard-branch discipline (wizard equipment recipes)
- Add study-physical-branch discipline (physical combat equipment recipes)
- Collect unlocksRecipes during discipline tick processing
- Pass recipe unlocks to crafting store via gameStore
- Add unlockRecipes action to craftingStore with persistence
- Filter fabricator recipes by unlock status in FabricatorSubTab UI
This commit is contained in:
2026-05-29 15:42:09 +02:00
parent 9e49aa1ca6
commit 644b76f16d
10 changed files with 216 additions and 8 deletions
+173 -1
View File
@@ -57,4 +57,176 @@ export const fabricatorDisciplines: DisciplineDefinition[] = [
},
],
},
];
{
id: 'study-fabricator-recipes',
name: 'Study Fabricator Recipes',
attunement: DisciplinesAttunementType.FABRICATOR,
manaType: 'earth',
baseCost: 10,
description: 'Learn to craft elemental equipment at the fabricator.',
statBonus: { stat: 'enchantPower', baseValue: 3, label: 'Enchantment Power' },
difficultyFactor: 100,
scalingFactor: 80,
drainBase: 2,
perks: [
{
id: 'fabricator-earth-recipes',
type: 'once',
threshold: 50,
value: 0,
description: 'Unlock Earth fabricator recipes',
unlocksRecipes: ['earthHelm', 'earthChest', 'earthBoots'],
},
{
id: 'fabricator-metal-recipes',
type: 'once',
threshold: 100,
value: 0,
description: 'Unlock Metal fabricator recipes',
unlocksRecipes: ['metalBlade', 'metalShield', 'metalGloves'],
},
{
id: 'fabricator-sand-recipes',
type: 'once',
threshold: 150,
value: 0,
description: 'Unlock Sand fabricator recipes',
unlocksRecipes: ['sandBoots', 'sandGloves', 'sandVest'],
},
{
id: 'fabricator-crystal-recipes',
type: 'once',
threshold: 200,
value: 0,
description: 'Unlock Crystal fabricator recipes',
unlocksRecipes: ['crystalWand', 'crystalRing', 'crystalAmulet'],
},
],
},
{
id: 'study-wizard-branch',
name: 'Study Wizard Equipment',
attunement: DisciplinesAttunementType.FABRICATOR,
manaType: 'earth',
baseCost: 15,
description: 'Learn to craft advanced wizard equipment.',
statBonus: { stat: 'enchantPower', baseValue: 5, label: 'Enchantment Power' },
difficultyFactor: 150,
scalingFactor: 100,
drainBase: 3,
requires: ['study-fabricator-recipes'],
perks: [
{
id: 'wizard-oak-staff',
type: 'once',
threshold: 50,
value: 0,
description: 'Unlock Oak Staff recipe',
unlocksRecipes: ['oakStaff'],
},
{
id: 'wizard-arcanist-staff',
type: 'once',
threshold: 100,
value: 0,
description: 'Unlock Arcanist Staff recipe',
unlocksRecipes: ['arcanistStaff'],
},
{
id: 'wizard-battlestaff',
type: 'once',
threshold: 150,
value: 0,
description: 'Unlock Battlestaff recipe',
unlocksRecipes: ['battlestaff'],
},
{
id: 'wizard-arcanist-set',
type: 'once',
threshold: 200,
value: 0,
description: 'Unlock Arcanist Circlet and Robe recipes',
unlocksRecipes: ['arcanistCirclet', 'arcanistRobe'],
},
{
id: 'wizard-void-catalyst',
type: 'once',
threshold: 250,
value: 0,
description: 'Unlock Void Catalyst recipe',
unlocksRecipes: ['voidCatalyst'],
},
{
id: 'wizard-arcanist-pendant',
type: 'once',
threshold: 300,
value: 0,
description: 'Unlock Arcanist Pendant recipe',
unlocksRecipes: ['arcanistPendant'],
},
],
},
{
id: 'study-physical-branch',
name: 'Study Physical Equipment',
attunement: DisciplinesAttunementType.FABRICATOR,
manaType: 'earth',
baseCost: 15,
description: 'Learn to craft advanced physical combat equipment.',
statBonus: { stat: 'enchantPower', baseValue: 5, label: 'Enchantment Power' },
difficultyFactor: 150,
scalingFactor: 100,
drainBase: 3,
requires: ['study-fabricator-recipes'],
perks: [
{
id: 'physical-crystal-blade',
type: 'once',
threshold: 50,
value: 0,
description: 'Unlock Crystal Blade recipe',
unlocksRecipes: ['crystalBlade'],
},
{
id: 'physical-arcanist-blade',
type: 'once',
threshold: 100,
value: 0,
description: 'Unlock Arcanist Blade recipe',
unlocksRecipes: ['arcanistBlade'],
},
{
id: 'physical-void-blade',
type: 'once',
threshold: 150,
value: 0,
description: 'Unlock Void Blade recipe',
unlocksRecipes: ['voidBlade'],
},
{
id: 'physical-battle-set',
type: 'once',
threshold: 200,
value: 0,
description: 'Unlock Battle Helm and Robe recipes',
unlocksRecipes: ['battleHelm', 'battleRobe'],
},
{
id: 'physical-battle-boots',
type: 'once',
threshold: 250,
value: 0,
description: 'Unlock Battle Boots recipe',
unlocksRecipes: ['battleBoots'],
},
{
id: 'physical-combat-gauntlets',
type: 'once',
threshold: 300,
value: 0,
description: 'Unlock Combat Gauntlets recipe',
unlocksRecipes: ['combatGauntlets'],
},
],
},
];