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:
@@ -1,8 +1,8 @@
|
|||||||
# Circular Dependencies
|
# 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.
|
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
|
2. 1) utils/floor-utils.ts > utils/room-utils.ts > utils/enemy-utils.ts
|
||||||
3. 2) utils/floor-utils.ts > utils/room-utils.ts
|
3. 2) utils/floor-utils.ts > utils/room-utils.ts
|
||||||
4. 3) stores/gameStore.ts > stores/gameActions.ts
|
4. 3) stores/gameStore.ts > stores/gameActions.ts
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"_meta": {
|
"_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.",
|
"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."
|
"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."
|
||||||
},
|
},
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 87 KiB |
@@ -229,6 +229,16 @@ export const useGameStore = create<GameCoordinatorStore>()(
|
|||||||
|
|
||||||
if (newProgress >= requiredTime) {
|
if (newProgress >= requiredTime) {
|
||||||
addLog(`📜 Pact signed with ${guardian.name}! You have gained their boons.`);
|
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 = {
|
||||||
...(writes.prestige || {}),
|
...(writes.prestige || {}),
|
||||||
signedPacts: [...ctx.prestige.signedPacts, ctx.prestige.pactRitualFloor],
|
signedPacts: [...ctx.prestige.signedPacts, ctx.prestige.pactRitualFloor],
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import { persist } from 'zustand/middleware';
|
|||||||
import { createSafeStorage } from '../utils/safe-persist';
|
import { createSafeStorage } from '../utils/safe-persist';
|
||||||
import { PRESTIGE_DEF } from '../constants';
|
import { PRESTIGE_DEF } from '../constants';
|
||||||
import { getGuardianForFloor } from '../data/guardian-encounters';
|
import { getGuardianForFloor } from '../data/guardian-encounters';
|
||||||
|
import { useManaStore } from './manaStore';
|
||||||
import { okVoid, fail, ErrorCode } from '../utils/result';
|
import { okVoid, fail, ErrorCode } from '../utils/result';
|
||||||
import type { Result } from '../utils/result';
|
import type { Result } from '../utils/result';
|
||||||
|
|
||||||
@@ -151,6 +152,15 @@ export const usePrestigeStore = create<PrestigeStore>()(
|
|||||||
const guardian = getGuardianForFloor(state.pactRitualFloor);
|
const guardian = getGuardianForFloor(state.pactRitualFloor);
|
||||||
if (!guardian) return;
|
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({
|
set({
|
||||||
signedPacts: [...state.signedPacts, state.pactRitualFloor],
|
signedPacts: [...state.signedPacts, state.pactRitualFloor],
|
||||||
defeatedGuardians: state.defeatedGuardians.filter(f => f !== state.pactRitualFloor),
|
defeatedGuardians: state.defeatedGuardians.filter(f => f !== state.pactRitualFloor),
|
||||||
|
|||||||
Reference in New Issue
Block a user