fix: guardian pact signing now unlocks mana types via unlockElement
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m24s
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m24s
This commit is contained in:
@@ -229,6 +229,16 @@ export const useGameStore = create<GameCoordinatorStore>()(
|
||||
|
||||
if (newProgress >= requiredTime) {
|
||||
addLog(`📜 Pact signed with ${guardian.name}! You have gained their boons.`);
|
||||
|
||||
// Unlock mana types granted by this guardian
|
||||
const manaStore = useManaStore.getState();
|
||||
for (const manaType of guardian.unlocksMana || []) {
|
||||
const result = manaStore.unlockElement(manaType, 0);
|
||||
if (result.ok) {
|
||||
addLog(`✨ ${manaType.charAt(0).toUpperCase() + manaType.slice(1)} mana unlocked!`);
|
||||
}
|
||||
}
|
||||
|
||||
writes.prestige = {
|
||||
...(writes.prestige || {}),
|
||||
signedPacts: [...ctx.prestige.signedPacts, ctx.prestige.pactRitualFloor],
|
||||
|
||||
Reference in New Issue
Block a user