From ef850e98e2aaeee96f50de1d3b2b682f83338ec3 Mon Sep 17 00:00:00 2001 From: n8n-gitea Date: Tue, 26 May 2026 18:28:24 +0200 Subject: [PATCH] refactor: simplify ManaStatsSection props from 17 fields to single stats object --- docs/circular-deps.txt | 4 +- docs/dependency-graph.json | 2 +- src/components/game/tabs/AttunementsTab.tsx | 1 - src/components/game/tabs/EquipmentTab.tsx | 2 +- src/components/game/tabs/PrestigeTab.tsx | 2 +- src/components/game/tabs/SpireSummaryTab.tsx | 2 +- src/components/game/tabs/StatsTab.tsx | 17 +------ .../game/tabs/StatsTab/ManaStatsSection.tsx | 46 ++++++++++--------- src/lib/game/effects/dynamic-compute.ts | 3 -- 9 files changed, 31 insertions(+), 48 deletions(-) diff --git a/docs/circular-deps.txt b/docs/circular-deps.txt index b41ef31..686eb30 100644 --- a/docs/circular-deps.txt +++ b/docs/circular-deps.txt @@ -1,8 +1,8 @@ # Circular Dependencies -Generated: 2026-05-26T15:02:41.168Z +Generated: 2026-05-26T16:00:34.993Z 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.6s) (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 diff --git a/docs/dependency-graph.json b/docs/dependency-graph.json index 2b5a979..28f3787 100644 --- a/docs/dependency-graph.json +++ b/docs/dependency-graph.json @@ -1,6 +1,6 @@ { "_meta": { - "generated": "2026-05-26T15:02:39.505Z", + "generated": "2026-05-26T16:00:33.141Z", "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/components/game/tabs/AttunementsTab.tsx b/src/components/game/tabs/AttunementsTab.tsx index 34fc545..6297e29 100644 --- a/src/components/game/tabs/AttunementsTab.tsx +++ b/src/components/game/tabs/AttunementsTab.tsx @@ -1,6 +1,5 @@ 'use client'; -import { useState } from 'react'; import { useAttunementStore } from '@/lib/game/stores'; import { ATTUNEMENTS_DEF, ATTUNEMENT_SLOT_NAMES, getAttunementXPForLevel, MAX_ATTUNEMENT_LEVEL } from '@/lib/game/data/attunements'; import type { AttunementDef, AttunementState } from '@/lib/game/types'; diff --git a/src/components/game/tabs/EquipmentTab.tsx b/src/components/game/tabs/EquipmentTab.tsx index 54225a5..07093b3 100644 --- a/src/components/game/tabs/EquipmentTab.tsx +++ b/src/components/game/tabs/EquipmentTab.tsx @@ -1,6 +1,6 @@ 'use client'; -import { useState, useCallback, useMemo } from 'react'; +import { useCallback, useMemo } from 'react'; import { useCraftingStore } from '@/lib/game/stores/craftingStore'; import type { EquipmentSlot } from '@/lib/game/types'; import { DebugName } from '@/components/game/debug/debug-context'; diff --git a/src/components/game/tabs/PrestigeTab.tsx b/src/components/game/tabs/PrestigeTab.tsx index a7e10da..6589576 100644 --- a/src/components/game/tabs/PrestigeTab.tsx +++ b/src/components/game/tabs/PrestigeTab.tsx @@ -1,6 +1,6 @@ 'use client'; -import { useState, useCallback } from 'react'; +import { useCallback } from 'react'; import { useShallow } from 'zustand/react/shallow'; import { usePrestigeStore, useGameStore } from '@/lib/game/stores'; import { PRESTIGE_DEF } from '@/lib/game/constants/prestige'; diff --git a/src/components/game/tabs/SpireSummaryTab.tsx b/src/components/game/tabs/SpireSummaryTab.tsx index a35ec2f..3cb95d1 100644 --- a/src/components/game/tabs/SpireSummaryTab.tsx +++ b/src/components/game/tabs/SpireSummaryTab.tsx @@ -1,6 +1,6 @@ 'use client'; -import { useState, useMemo } from 'react'; +import { useMemo } from 'react'; import { useShallow } from 'zustand/react/shallow'; import { useCombatStore, usePrestigeStore, fmt } from '@/lib/game/stores'; import { ELEMENT_OPPOSITES, FLOOR_ELEM_CYCLE } from '@/lib/game/constants'; diff --git a/src/components/game/tabs/StatsTab.tsx b/src/components/game/tabs/StatsTab.tsx index 3239833..b2b830d 100644 --- a/src/components/game/tabs/StatsTab.tsx +++ b/src/components/game/tabs/StatsTab.tsx @@ -22,23 +22,8 @@ export function StatsTab() { return (
diff --git a/src/lib/game/effects/dynamic-compute.ts b/src/lib/game/effects/dynamic-compute.ts index ec9eeb3..02259c6 100644 --- a/src/lib/game/effects/dynamic-compute.ts +++ b/src/lib/game/effects/dynamic-compute.ts @@ -7,8 +7,6 @@ import { SPECIAL_EFFECTS, hasSpecial } from './special-effects'; // Threshold ratios for mana-dependent effects (currentMana / maxMana) const MANA_HIGH_THRESHOLD = 0.75; -const MANA_OVERPOWER_THRESHOLD = 0.8; -const MANA_BERSERKER_THRESHOLD = 0.5; const MANA_LOW_THRESHOLD = 0.25; const MANA_CRITICAL_THRESHOLD = 0.1; @@ -87,4 +85,3 @@ export function computeDynamicClickMana( return Math.floor((baseClickMana + effects.clickManaBonus) * effects.clickManaMultiplier); } -