diff --git a/docs/circular-deps.txt b/docs/circular-deps.txt index 17531c5..c09e5f5 100644 --- a/docs/circular-deps.txt +++ b/docs/circular-deps.txt @@ -1,8 +1,8 @@ # Circular Dependencies -Generated: 2026-05-19T10:06:50.403Z +Generated: 2026-05-19T10:35:03.017Z Found: 3 circular chain(s) — these MUST be fixed before modifying involved files. -1. Processed 121 files (1.3s) (28 warnings) +1. Processed 121 files (1.2s) (4 warnings) 2. 1) data/equipment/index.ts > data/equipment/utils.ts 3. 2) data/golems/index.ts > data/golems/utils.ts diff --git a/docs/dependency-graph.json b/docs/dependency-graph.json index f4f78ae..4744c82 100644 --- a/docs/dependency-graph.json +++ b/docs/dependency-graph.json @@ -1,6 +1,6 @@ { "_meta": { - "generated": "2026-05-19T10:06:48.891Z", + "generated": "2026-05-19T10:35:01.630Z", "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." }, diff --git a/src/lib/game/stores/discipline-slice.ts b/src/lib/game/stores/discipline-slice.ts index 2615111..cf85440 100644 --- a/src/lib/game/stores/discipline-slice.ts +++ b/src/lib/game/stores/discipline-slice.ts @@ -101,8 +101,11 @@ export const useDisciplineStore = create()( if (def.manaType === 'raw') { rawMana -= drain; - } else { - elements[def.manaType].current -= drain; + } else if (elements[def.manaType]) { + elements[def.manaType] = { + ...elements[def.manaType], + current: elements[def.manaType].current - drain, + }; } newDisciplines[id] = { ...disc, xp: disc.xp + 1 };