fix: guardian pact signing now unlocks mana types via unlockElement
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m24s

This commit is contained in:
2026-05-26 17:02:36 +02:00
parent b402b8f56e
commit ae30c4770c
5 changed files with 23 additions and 3 deletions
+2 -2
View File
@@ -1,8 +1,8 @@
# Circular Dependencies
Generated: 2026-05-26T08:53:53.586Z
Generated: 2026-05-26T09:20:42.073Z
Found: 6 circular chain(s) — these MUST be fixed before modifying involved files.
1. Processed 135 files (1.5s) (2 warnings)
1. Processed 135 files (1.7s) (2 warnings)
2. 1) utils/floor-utils.ts > utils/room-utils.ts > utils/enemy-utils.ts
3. 2) utils/floor-utils.ts > utils/room-utils.ts
4. 3) stores/gameStore.ts > stores/gameActions.ts
+1 -1
View File
@@ -1,6 +1,6 @@
{
"_meta": {
"generated": "2026-05-26T08:53:51.901Z",
"generated": "2026-05-26T09:20:40.084Z",
"description": "Import dependency graph for src/lib/game. Keys are files, values are arrays of files they import.",
"usage": "To find what a file affects, search for its path in the VALUES. To find what a file depends on, look at its KEY entry."
},
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 87 KiB

+10
View File
@@ -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],
+10
View File
@@ -6,6 +6,7 @@ import { persist } from 'zustand/middleware';
import { createSafeStorage } from '../utils/safe-persist';
import { PRESTIGE_DEF } from '../constants';
import { getGuardianForFloor } from '../data/guardian-encounters';
import { useManaStore } from './manaStore';
import { okVoid, fail, ErrorCode } from '../utils/result';
import type { Result } from '../utils/result';
@@ -151,6 +152,15 @@ export const usePrestigeStore = create<PrestigeStore>()(
const guardian = getGuardianForFloor(state.pactRitualFloor);
if (!guardian) return;
// 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!`);
}
}
set({
signedPacts: [...state.signedPacts, state.pactRitualFloor],
defeatedGuardians: state.defeatedGuardians.filter(f => f !== state.pactRitualFloor),