diff --git a/docs/circular-deps.txt b/docs/circular-deps.txt index e9b24fb..75018d4 100644 --- a/docs/circular-deps.txt +++ b/docs/circular-deps.txt @@ -1,8 +1,8 @@ # Circular Dependencies -Generated: 2026-05-25T15:37:17.998Z +Generated: 2026-05-25T16:26:37.693Z Found: 6 circular chain(s) — these MUST be fixed before modifying involved files. -1. Processed 135 files (1.7s) (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 be1bee4..f65cc2e 100644 --- a/docs/dependency-graph.json +++ b/docs/dependency-graph.json @@ -1,6 +1,6 @@ { "_meta": { - "generated": "2026-05-25T15:37:16.139Z", + "generated": "2026-05-25T16:26:35.898Z", "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/scorecard.png b/scorecard.png index 7c34f2f..60ca011 100644 Binary files a/scorecard.png and b/scorecard.png differ diff --git a/src/app/components/LeftPanel.tsx b/src/app/components/LeftPanel.tsx index d7691fc..15bc323 100644 --- a/src/app/components/LeftPanel.tsx +++ b/src/app/components/LeftPanel.tsx @@ -10,7 +10,6 @@ import { AttunementStatus } from '@/components/game/AttunementStatus'; import { ActivityLogPanel } from '@/components/game/ActivityLogPanel'; import { DebugName } from '@/components/game/debug/debug-context'; import { useGameStore, useManaStore, useCombatStore, useCraftingStore, usePrestigeStore } from '@/lib/game/stores'; -import { computeDisciplineEffects } from '@/lib/game/effects/discipline-effects'; import { getUnifiedEffects } from '@/lib/game/effects'; import { getMeditationBonus, getIncursionStrength } from '@/lib/game/stores'; import { computeTotalMaxMana, computeTotalRegen, computeTotalClickMana } from '@/lib/game/effects'; diff --git a/src/app/page.tsx b/src/app/page.tsx index fedfe4f..de813be 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -10,12 +10,11 @@ import { useCombatStore, usePrestigeStore, useCraftingStore, - fmt, computeMaxMana, computeRegen, computeClickMana, getMeditationBonus, - getIncursionStrength, + getIncursionStrength } from '@/lib/game/stores'; import { computeDisciplineEffects } from '@/lib/game/effects/discipline-effects'; import { useGameLoop } from '@/lib/game/stores/gameHooks'; @@ -26,7 +25,6 @@ import { TimeDisplay } from '@/components/game'; import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'; import { TooltipProvider } from '@/components/ui/tooltip'; import { ErrorBoundary } from '@/components/ErrorBoundary'; -import { DebugName } from '@/components/game/debug/debug-context'; import { GameOverScreen } from './components/GameOverScreen'; import { LeftPanel } from './components/LeftPanel'; diff --git a/src/components/game/LootInventory/icons.ts b/src/components/game/LootInventory/icons.ts index f580c16..9ed7235 100644 --- a/src/components/game/LootInventory/icons.ts +++ b/src/components/game/LootInventory/icons.ts @@ -1,7 +1,13 @@ -import { Gem, Sparkles, Scroll, Droplet, Trash2, Search, - Package, Sword, Shield, Shirt, Crown, ArrowUpDown, - Wrench, AlertTriangle } from 'lucide-react'; -import type { EquipmentCategory } from '@/lib/game/data/equipment'; +import { + Gem, + Sparkles, + Package, + Sword, + Shield, + Shirt, + Crown, + Wrench +} from 'lucide-react'; export const CATEGORY_ICONS: Record = { caster: Sword, diff --git a/src/components/game/LootInventory/types.ts b/src/components/game/LootInventory/types.ts index ed4875a..3cd12a8 100644 --- a/src/components/game/LootInventory/types.ts +++ b/src/components/game/LootInventory/types.ts @@ -1,11 +1,5 @@ 'use client'; -import { useState } from 'react'; -import type { LootInventory as LootInventoryType, EquipmentInstance, ElementState } from '@/lib/game/types'; -import { LOOT_DROPS } from '@/lib/game/data/loot-drops'; -import { EQUIPMENT_TYPES } from '@/lib/game/data/equipment'; -import { ELEMENTS } from '@/lib/game/constants'; - export type SortMode = 'name' | 'rarity' | 'count'; export type FilterMode = 'all' | 'materials' | 'essence' | 'blueprints' | 'equipment'; diff --git a/src/components/game/crafting/EnchantmentApplier.tsx b/src/components/game/crafting/EnchantmentApplier.tsx index b5272eb..4d38af3 100644 --- a/src/components/game/crafting/EnchantmentApplier.tsx +++ b/src/components/game/crafting/EnchantmentApplier.tsx @@ -1,19 +1,16 @@ 'use client'; -import { useState } from 'react'; import { ActionButton } from '@/components/ui/action-button'; import { GameCard } from '@/components/ui/game-card'; import { SectionHeader } from '@/components/ui/section-header'; import { StatRow } from '@/components/ui/stat-row'; -import { Badge } from '@/components/ui/badge'; import { ScrollArea } from '@/components/ui/scroll-area'; import { Separator } from '@/components/ui/separator'; import { ENCHANTMENT_EFFECTS } from '@/lib/game/data/enchantment-effects'; -import type { EquipmentInstance, EnchantmentDesign, AppliedEnchantment, LootInventory, EquipmentCraftingProgress } from '@/lib/game/types'; import type { EquipmentSlot } from '@/lib/game/data/equipment'; import { fmt } from '@/lib/game/stores'; import { CheckCircle, Sparkles } from 'lucide-react'; -import { useGameStore, useCraftingStore, useManaStore } from '@/lib/game/stores'; +import { useCraftingStore, useManaStore } from '@/lib/game/stores'; export interface EnchantmentApplierProps { selectedEquipmentInstance: string | null; @@ -36,7 +33,7 @@ export function EnchantmentApplier({ const equipmentInstances = useCraftingStore((s) => s.equipmentInstances); const enchantmentDesigns = useCraftingStore((s) => s.enchantmentDesigns); const applicationProgress = useCraftingStore((s) => s.applicationProgress); - const rawMana = useManaStore((s) => s.rawMana); + const _rawMana = useManaStore((s) => s.rawMana); const startApplying = useCraftingStore((s) => s.startApplying); const pauseApplication = useCraftingStore((s) => s.pauseApplication); const resumeApplication = useCraftingStore((s) => s.resumeApplication); diff --git a/src/components/game/crafting/EnchantmentDesigner.tsx b/src/components/game/crafting/EnchantmentDesigner.tsx index 0e5cb10..31239c4 100644 --- a/src/components/game/crafting/EnchantmentDesigner.tsx +++ b/src/components/game/crafting/EnchantmentDesigner.tsx @@ -1,10 +1,7 @@ 'use client'; -import { useState, useMemo } from 'react'; import { GameCard } from '@/components/ui/game-card'; import { Separator } from '@/components/ui/separator'; -import { EQUIPMENT_TYPES } from '@/lib/game/data/equipment'; -import { ENCHANTMENT_EFFECTS } from '@/lib/game/data/enchantment-effects'; import type { EquipmentInstance, EnchantmentDesign, DesignEffect, EquipmentCraftingProgress, EquipmentCategory } from '@/lib/game/types'; import type { EnchantmentDesignerProps } from './EnchantmentDesigner/types'; import { EquipmentTypeSelector } from './EnchantmentDesigner/EquipmentTypeSelector'; diff --git a/src/components/game/crafting/EnchantmentDesigner/EffectSelector.tsx b/src/components/game/crafting/EnchantmentDesigner/EffectSelector.tsx index db0b6fb..6d12eb9 100644 --- a/src/components/game/crafting/EnchantmentDesigner/EffectSelector.tsx +++ b/src/components/game/crafting/EnchantmentDesigner/EffectSelector.tsx @@ -1,7 +1,5 @@ 'use client'; -import { GameCard } from '@/components/ui/game-card'; -import { SectionHeader } from '@/components/ui/section-header'; import { ActionButton } from '@/components/ui/action-button'; import { Badge } from '@/components/ui/badge'; import { ScrollArea } from '@/components/ui/scroll-area'; diff --git a/src/components/game/crafting/EnchantmentPreparer.tsx b/src/components/game/crafting/EnchantmentPreparer.tsx index 19f9854..0c731d0 100644 --- a/src/components/game/crafting/EnchantmentPreparer.tsx +++ b/src/components/game/crafting/EnchantmentPreparer.tsx @@ -10,11 +10,9 @@ import { ScrollArea } from '@/components/ui/scroll-area'; import { Separator } from '@/components/ui/separator'; import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger } from '@/components/ui/alert-dialog'; import { Trash2, CheckCircle, AlertTriangle } from 'lucide-react'; -import { EQUIPMENT_TYPES } from '@/lib/game/data/equipment'; -import type { EquipmentInstance, AppliedEnchantment, LootInventory, EquipmentCraftingProgress } from '@/lib/game/types'; import type { EquipmentSlot } from '@/lib/game/types'; import { fmt } from '@/lib/game/stores'; -import { useGameStore, useCraftingStore, useManaStore } from '@/lib/game/stores'; +import { useCraftingStore, useManaStore } from '@/lib/game/stores'; import { useGameToast } from '@/components/game/GameToast'; export interface EnchantmentPreparerProps { diff --git a/src/components/game/crafting/EquipmentCrafter.tsx b/src/components/game/crafting/EquipmentCrafter.tsx index a08ef9a..9169c75 100644 --- a/src/components/game/crafting/EquipmentCrafter.tsx +++ b/src/components/game/crafting/EquipmentCrafter.tsx @@ -36,18 +36,17 @@ function CraftingProgress({ progress }: { progress: { blueprintId: string; progr // ─── Blueprint Card ─────────────────────────────────────────────────────────── -function BlueprintCard({ bpId, lootInventory, rawMana, isCrafting, startCraftingEquipment, currentAction }: { +function BlueprintCard({ bpId, lootInventory, rawMana, isCrafting, startCraftingEquipment }: { bpId: string; lootInventory: LootInventory; rawMana: number; isCrafting: boolean; startCraftingEquipment: (id: string) => void; - currentAction: string | null; }) { const recipe = CRAFTING_RECIPES[bpId]; if (!recipe) return null; - const { canCraft, missingMaterials } = canCraftRecipe(recipe, lootInventory.materials, rawMana); + const { canCraft } = canCraftRecipe(recipe, lootInventory.materials, rawMana); const rarityStyle = LOOT_RARITY_COLORS[recipe.rarity]; return ( @@ -137,7 +136,6 @@ function BlueprintList({ lootInventory, rawMana, startCraftingEquipment, current rawMana={rawMana} isCrafting={currentAction === 'craft'} startCraftingEquipment={startCraftingEquipment} - currentAction={currentAction} /> ))} diff --git a/src/components/game/debug/GameStateDebug.tsx b/src/components/game/debug/GameStateDebug.tsx index 7ffd74d..b310d9c 100644 --- a/src/components/game/debug/GameStateDebug.tsx +++ b/src/components/game/debug/GameStateDebug.tsx @@ -186,8 +186,7 @@ function TimeControlSection({ day, hour, paused, onSetDay, onTogglePause }: { // ─── Quick Actions Section ─────────────────────────────────────────────────── -function QuickActionsSection({ elements, onUnlockBase, onUnlockUtility, onSkipToFloor, onResetFloorHP }: { - elements: Record; +function QuickActionsSection({ onUnlockBase, onUnlockUtility, onSkipToFloor, onResetFloorHP }: { onUnlockBase: () => void; onUnlockUtility: () => void; onSkipToFloor: () => void; @@ -292,7 +291,6 @@ export function GameStateDebug() { debugSetFloor?.(100)} diff --git a/src/components/game/debug/PactDebug.tsx b/src/components/game/debug/PactDebug.tsx index 661858d..3efd4f8 100644 --- a/src/components/game/debug/PactDebug.tsx +++ b/src/components/game/debug/PactDebug.tsx @@ -3,7 +3,7 @@ import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; import { Button } from '@/components/ui/button'; import { Bug } from 'lucide-react'; -import { usePrestigeStore, useManaStore, useUIStore, useGameStore } from '@/lib/game/stores'; +import { usePrestigeStore, useUIStore, useGameStore } from '@/lib/game/stores'; import { ELEMENTS } from '@/lib/game/constants'; import { getGuardianForFloor, getAllGuardianFloors } from '@/lib/game/data/guardian-encounters'; @@ -80,14 +80,13 @@ function GuardianPactList({ signedPacts, onForceSign, onRemove }: { export function PactDebug() { const signedPacts = usePrestigeStore((s) => s.signedPacts); const signedPactDetails = usePrestigeStore((s) => s.signedPactDetails); - const elements = useManaStore((s) => s.elements); const prestigeUpgrades = usePrestigeStore((s) => s.prestigeUpgrades); const addSignedPact = usePrestigeStore((s) => s.addSignedPact); const removePact = usePrestigeStore((s) => s.removePact); const debugSetSignedPacts = usePrestigeStore((s) => s.debugSetSignedPacts); const debugSetPactDetails = usePrestigeStore((s) => s.debugSetPactDetails); - const unlockElement = useManaStore((s) => s.unlockElement); + const addLog = useUIStore((s) => s.addLog); diff --git a/src/components/game/debug/debug-context.tsx b/src/components/game/debug/debug-context.tsx old mode 100755 new mode 100644 index 642f706..8c46e41 --- a/src/components/game/debug/debug-context.tsx +++ b/src/components/game/debug/debug-context.tsx @@ -1,6 +1,11 @@ 'use client'; -import { createContext, useContext, useState, useEffect, type ReactNode } from 'react'; +import { + createContext, + useContext, + useState, + type ReactNode +} from 'react'; interface DebugContextType { showComponentNames: boolean; diff --git a/src/components/game/tabs/AttunementsTab.tsx b/src/components/game/tabs/AttunementsTab.tsx index de56d26..ca2ab23 100644 --- a/src/components/game/tabs/AttunementsTab.tsx +++ b/src/components/game/tabs/AttunementsTab.tsx @@ -8,7 +8,6 @@ import { Card, CardContent } from '@/components/ui/card'; import { Badge } from '@/components/ui/badge'; import { Progress } from '@/components/ui/progress'; import { ScrollArea } from '@/components/ui/scroll-area'; -import { SectionHeader } from '@/components/ui/section-header'; import { DebugName } from '@/components/game/debug/debug-context'; import { fmt } from '@/lib/game/stores'; diff --git a/src/components/game/tabs/CraftingTab.test.ts b/src/components/game/tabs/CraftingTab.test.ts index e4a2f2d..8301a9b 100644 --- a/src/components/game/tabs/CraftingTab.test.ts +++ b/src/components/game/tabs/CraftingTab.test.ts @@ -98,7 +98,7 @@ describe('Fabricator recipes data', () => { }); it('getRecipesByManaType filters correctly', async () => { - const { getRecipesByManaType, FABRICATOR_RECIPES } = await import('@/lib/game/data/fabricator-recipes'); + const { getRecipesByManaType } = await import('@/lib/game/data/fabricator-recipes'); const earthRecipes = getRecipesByManaType('earth'); expect(earthRecipes.length).toBeGreaterThan(0); for (const r of earthRecipes) { diff --git a/src/components/game/tabs/CraftingTab/FabricatorSubTab.tsx b/src/components/game/tabs/CraftingTab/FabricatorSubTab.tsx index 04e2458..c935462 100644 --- a/src/components/game/tabs/CraftingTab/FabricatorSubTab.tsx +++ b/src/components/game/tabs/CraftingTab/FabricatorSubTab.tsx @@ -37,7 +37,7 @@ function RecipeCard({ onCraft: (recipe: FabricatorRecipe) => void; isCrafting: boolean; }) { - const { canCraft, missingMaterials, missingMana } = canCraftRecipe( + const { canCraft } = canCraftRecipe( recipe, materials, manaAmount, diff --git a/src/components/game/tabs/DebugTab/DisciplineDebugSection.tsx b/src/components/game/tabs/DebugTab/DisciplineDebugSection.tsx index 3433afa..602bf1d 100644 --- a/src/components/game/tabs/DebugTab/DisciplineDebugSection.tsx +++ b/src/components/game/tabs/DebugTab/DisciplineDebugSection.tsx @@ -13,7 +13,7 @@ export function DisciplineDebugSection() { const activate = useDisciplineStore((s) => s.activate); const deactivate = useDisciplineStore((s) => s.deactivate); - const handleTogglePause = (id: string) => { + const _handleTogglePause = (id: string) => { const disc = disciplines[id]; if (!disc) return; if (disc.paused) { @@ -77,7 +77,6 @@ export function DisciplineDebugSection() { const disc = disciplines[def.id]; const isActive = activeIds.includes(def.id); const xp = disc?.xp || 0; - const isPaused = disc?.paused ?? true; return (
; +function QuickActionsSection({ onUnlockBase, onSkipToFloor, onResetFloorHP }: { onUnlockBase: () => void; onSkipToFloor: () => void; onResetFloorHP: () => void; @@ -261,7 +260,6 @@ export function GameStateDebugSection() { debugSetFloor?.(100)} onResetFloorHP={() => resetFloorHP?.()} diff --git a/src/components/game/tabs/DebugTab/PactDebugSection.tsx b/src/components/game/tabs/DebugTab/PactDebugSection.tsx index 201f492..e2dae75 100644 --- a/src/components/game/tabs/DebugTab/PactDebugSection.tsx +++ b/src/components/game/tabs/DebugTab/PactDebugSection.tsx @@ -3,7 +3,7 @@ import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; import { Button } from '@/components/ui/button'; import { Bug } from 'lucide-react'; -import { usePrestigeStore, useManaStore, useUIStore, useGameStore } from '@/lib/game/stores'; +import { usePrestigeStore, useUIStore, useGameStore } from '@/lib/game/stores'; import { ELEMENTS } from '@/lib/game/constants'; import { getGuardianForFloor, getAllGuardianFloors } from '@/lib/game/data/guardian-encounters'; @@ -56,15 +56,12 @@ function GuardianPactRow({ floor, isSigned, onForceSign, onRemove }: { export function PactDebugSection() { const signedPacts = usePrestigeStore((s) => s.signedPacts); const signedPactDetails = usePrestigeStore((s) => s.signedPactDetails); - const elements = useManaStore((s) => s.elements); const prestigeUpgrades = usePrestigeStore((s) => s.prestigeUpgrades); const addSignedPact = usePrestigeStore((s) => s.addSignedPact); const removePact = usePrestigeStore((s) => s.removePact); const debugSetSignedPacts = usePrestigeStore((s) => s.debugSetSignedPacts); const debugSetPactDetails = usePrestigeStore((s) => s.debugSetPactDetails); - const unlockElement = useManaStore((s) => s.unlockElement); - const addLog = useUIStore((s) => s.addLog); const guardianFloors = getAllGuardianFloors(); diff --git a/src/components/game/tabs/EquipmentTab.test.ts b/src/components/game/tabs/EquipmentTab.test.ts index 795c7d5..31035b2 100644 --- a/src/components/game/tabs/EquipmentTab.test.ts +++ b/src/components/game/tabs/EquipmentTab.test.ts @@ -1,4 +1,4 @@ -import { describe, it, expect, vi } from 'vitest'; +import { describe, it, expect } from 'vitest'; // ─── Test: EquipmentTab barrel export ────────────────────────────────────────── diff --git a/src/components/game/tabs/SpellsTab.tsx b/src/components/game/tabs/SpellsTab.tsx old mode 100755 new mode 100644 index c03ab06..c559607 --- a/src/components/game/tabs/SpellsTab.tsx +++ b/src/components/game/tabs/SpellsTab.tsx @@ -1,6 +1,6 @@ 'use client'; -import { canAffordSpellCost, fmt } from '@/lib/game/stores'; +import { canAffordSpellCost } from '@/lib/game/stores'; import { useCombatStore, useManaStore } from '@/lib/game/stores'; import { ELEMENTS, SPELLS_DEF } from '@/lib/game/constants'; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; diff --git a/src/components/game/tabs/SpireCombatPage/RoomDisplay.tsx b/src/components/game/tabs/SpireCombatPage/RoomDisplay.tsx index a9ddd4c..60128c8 100644 --- a/src/components/game/tabs/SpireCombatPage/RoomDisplay.tsx +++ b/src/components/game/tabs/SpireCombatPage/RoomDisplay.tsx @@ -5,7 +5,6 @@ import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; import { Badge } from '@/components/ui/badge'; import { Progress } from '@/components/ui/progress'; import { getSpireRoomTypeDisplay } from '@/lib/game/utils/spire-utils'; -import { getModifierDisplay, getModifierDescription } from '@/lib/game/utils/enemy-generator'; import { ELEMENTS } from '@/lib/game/constants'; import { fmt } from '@/lib/game/stores'; @@ -14,7 +13,7 @@ interface RoomDisplayProps { floor: number; } -function EnemyRow({ enemy, floor }: { enemy: EnemyState; floor: number }) { +function EnemyRow({ enemy }: { enemy: EnemyState }) { const elemDef = ELEMENTS[enemy.element]; const hpPercent = enemy.maxHP > 0 ? (enemy.hp / enemy.maxHP) * 100 : 0; const barrierVal = enemy.barrier ?? 0; @@ -192,7 +191,7 @@ export function RoomDisplay({ floorState, floor }: RoomDisplayProps) {
Room cleared!
) : ( enemies.map((enemy) => ( - + )) )} diff --git a/src/components/game/tabs/SpireCombatPage/SpireCombatControls.tsx b/src/components/game/tabs/SpireCombatPage/SpireCombatControls.tsx index 76780b7..d9280ac 100644 --- a/src/components/game/tabs/SpireCombatPage/SpireCombatControls.tsx +++ b/src/components/game/tabs/SpireCombatPage/SpireCombatControls.tsx @@ -1,10 +1,8 @@ 'use client'; -import { useCombatStore, useManaStore, canAffordSpellCost, fmt } from '@/lib/game/stores'; +import { useCombatStore, useManaStore, canAffordSpellCost } from '@/lib/game/stores'; import { SPELLS_DEF, ELEMENTS } from '@/lib/game/constants'; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; -import { Button } from '@/components/ui/button'; -import { Badge } from '@/components/ui/badge'; import { Progress } from '@/components/ui/progress'; import { GOLEMS_DEF } from '@/lib/game/data/golems'; diff --git a/src/components/game/tabs/SpireCombatPage/SpireCombatPage.tsx b/src/components/game/tabs/SpireCombatPage/SpireCombatPage.tsx index ef4edd9..4a187d3 100644 --- a/src/components/game/tabs/SpireCombatPage/SpireCombatPage.tsx +++ b/src/components/game/tabs/SpireCombatPage/SpireCombatPage.tsx @@ -114,7 +114,7 @@ export function SpireCombatPage() { setAction('climb'); }, [currentFloor, totalRooms, setCurrentRoom, setAction]); - const handleRoomCleared = () => { + const _handleRoomCleared = () => { const nextRoomIndex = roomsCleared + 1; if (nextRoomIndex >= totalRooms) { diff --git a/src/components/game/tabs/StatsTab.tsx b/src/components/game/tabs/StatsTab.tsx old mode 100755 new mode 100644 index 8242ec8..3239833 --- a/src/components/game/tabs/StatsTab.tsx +++ b/src/components/game/tabs/StatsTab.tsx @@ -1,7 +1,6 @@ 'use client'; -import { usePrestigeStore, fmt, fmtDec } from '@/lib/game/stores'; -import { ELEMENTS } from '@/lib/game/constants'; +import { usePrestigeStore } from '@/lib/game/stores'; import { useManaStats, useCombatStats, useStudyStats } from '@/lib/game/hooks/useGameDerived'; import { ManaStatsSection } from './StatsTab/ManaStatsSection'; import { CombatStatsSection } from './StatsTab/CombatStatsSection'; diff --git a/src/components/game/tabs/StatsTab/ElementStatsSection.tsx b/src/components/game/tabs/StatsTab/ElementStatsSection.tsx index 075d8bb..3b99aac 100644 --- a/src/components/game/tabs/StatsTab/ElementStatsSection.tsx +++ b/src/components/game/tabs/StatsTab/ElementStatsSection.tsx @@ -4,7 +4,6 @@ import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; import { Separator } from '@/components/ui/separator'; import { FlaskConical } from 'lucide-react'; import { ELEMENTS } from '@/lib/game/constants'; -import { fmt, fmtDec } from '@/lib/game/stores'; import { usePrestigeStore, useManaStore } from '@/lib/game/stores'; import type { ElementState } from '@/lib/game/types'; diff --git a/src/components/ui/element-badge.tsx b/src/components/ui/element-badge.tsx index 4941b3f..6297e8e 100644 --- a/src/components/ui/element-badge.tsx +++ b/src/components/ui/element-badge.tsx @@ -10,11 +10,10 @@ import { Skull, Zap, Waves, - Star, CloudLightning, Snowflake, Sparkles, - Globe, + Globe } from "lucide-react"; interface ElementBadgeProps extends React.HTMLAttributes { diff --git a/src/components/ui/stepper.tsx b/src/components/ui/stepper.tsx index b1596bb..d3bd418 100644 --- a/src/components/ui/stepper.tsx +++ b/src/components/ui/stepper.tsx @@ -1,6 +1,6 @@ import * as React from "react"; import { cn } from "@/lib/utils"; -import { Check, Circle, ArrowRight } from "lucide-react"; +import { Check } from "lucide-react"; interface StepperProps extends React.HTMLAttributes { steps: string[]; diff --git a/src/lib/game/__tests__/bug-fixes.test.ts b/src/lib/game/__tests__/bug-fixes.test.ts old mode 100755 new mode 100644 index bddd230..8a180fc --- a/src/lib/game/__tests__/bug-fixes.test.ts +++ b/src/lib/game/__tests__/bug-fixes.test.ts @@ -1,5 +1,5 @@ import { describe, it, expect } from 'vitest'; -import { calculateEffectCapacityCost, ENCHANTMENT_EFFECTS } from '../data/enchantment-effects'; +import { calculateEffectCapacityCost } from '../data/enchantment-effects'; import { EQUIPMENT_TYPES } from '../data/equipment'; import { ATTUNEMENTS_DEF, getAttunementConversionRate } from '../data/attunements'; import { getFloorMaxHP } from '../utils'; diff --git a/src/lib/game/__tests__/computed-stats.test.ts b/src/lib/game/__tests__/computed-stats.test.ts old mode 100755 new mode 100644 index c51f75e..fab825d --- a/src/lib/game/__tests__/computed-stats.test.ts +++ b/src/lib/game/__tests__/computed-stats.test.ts @@ -12,7 +12,7 @@ import { getMeditationBonus, getIncursionStrength, } from '../utils'; -import { MAX_DAY, INCURSION_START_DAY, HOURS_PER_TICK } from '../constants'; +import { MAX_DAY, INCURSION_START_DAY } from '../constants'; describe('fmt', () => { it('should format numbers < 1000 as integers', () => { diff --git a/src/lib/game/__tests__/cross-module-combat-meditation.test.ts b/src/lib/game/__tests__/cross-module-combat-meditation.test.ts index 17b2bd3..e15e137 100644 --- a/src/lib/game/__tests__/cross-module-combat-meditation.test.ts +++ b/src/lib/game/__tests__/cross-module-combat-meditation.test.ts @@ -2,7 +2,6 @@ import { describe, it, expect, beforeEach } from 'vitest'; import { useGameStore } from '../stores/gameStore'; import { useManaStore } from '../stores/manaStore'; import { useCombatStore } from '../stores/combatStore'; -import { useUIStore } from '../stores/uiStore'; import { MAX_DAY } from '../constants'; import { getFloorMaxHP } from '../utils'; import { resetAllStores, tickN } from './cross-module-helpers'; diff --git a/src/lib/game/__tests__/enemy-utils.test.ts b/src/lib/game/__tests__/enemy-utils.test.ts index 83dcb50..3ae75da 100644 --- a/src/lib/game/__tests__/enemy-utils.test.ts +++ b/src/lib/game/__tests__/enemy-utils.test.ts @@ -1,4 +1,10 @@ -import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'; +import { + describe, + it, + expect, + vi, + afterEach +} from 'vitest'; import { getEnemyName, generateSwarmEnemies } from '../utils/enemy-utils'; import { FLOOR_ELEM_CYCLE } from '../constants'; diff --git a/src/lib/game/__tests__/floor-utils.upgraded.test.ts b/src/lib/game/__tests__/floor-utils.upgraded.test.ts index 35bbe66..336104d 100644 --- a/src/lib/game/__tests__/floor-utils.upgraded.test.ts +++ b/src/lib/game/__tests__/floor-utils.upgraded.test.ts @@ -5,7 +5,6 @@ import { describe, it, expect } from 'vitest'; import { getFloorMaxHP, getFloorElement } from '../utils/floor-utils'; -import { FLOOR_ELEM_CYCLE } from '../constants'; // Helper: compute expected guardian HP (same formula as guardian-data.ts) function guardianHP(floor: number): number { diff --git a/src/lib/game/__tests__/pact-utils.test.ts b/src/lib/game/__tests__/pact-utils.test.ts index 885aac2..fc76c53 100644 --- a/src/lib/game/__tests__/pact-utils.test.ts +++ b/src/lib/game/__tests__/pact-utils.test.ts @@ -20,7 +20,7 @@ function getDamageMult(mult: number, extraPacts: number, mitigation: number): nu } // Apply the actual calculation to test values -function computeTestResult( multipliers: number[], extraPacts: number, mitigation: number): number { +function _computeTestResult( multipliers: number[], extraPacts: number, mitigation: number): number { const baseMult = multipliers.reduce((a, b) => a * b, 1); return getDamageMult(baseMult, extraPacts, mitigation); } @@ -118,7 +118,6 @@ describe('computePactMultiplier', () => { const floor10 = getGuardianForFloor(10)!; const floor20 = getGuardianForFloor(20)!; const floor30 = getGuardianForFloor(30)!; - const baseMult = floor10.damageMultiplier * floor20.damageMultiplier * floor30.damageMultiplier; // 3 pacts: numAdditional = 2, basePenalty = 1.0, effectivePenalty = 1.0 // result = baseMult * (1 - 1.0) = 0 @@ -229,7 +228,6 @@ describe('computePactInsightMultiplier', () => { const floor10 = getGuardianForFloor(10)!; const floor20 = getGuardianForFloor(20)!; const floor30 = getGuardianForFloor(30)!; - const baseMult = floor10.insightMultiplier * floor20.insightMultiplier * floor30.insightMultiplier; const result = computePactInsightMultiplier({ signedPacts: [10, 20, 30], diff --git a/src/lib/game/__tests__/regression-fixes.test.ts b/src/lib/game/__tests__/regression-fixes.test.ts index be37f14..7625417 100644 --- a/src/lib/game/__tests__/regression-fixes.test.ts +++ b/src/lib/game/__tests__/regression-fixes.test.ts @@ -1,7 +1,7 @@ import { describe, it, expect, vi } from 'vitest'; import { readFileSync } from 'fs'; import { computeDynamicRegen } from '../effects/dynamic-compute'; -import { SPECIAL_EFFECTS, hasSpecial } from '../effects/special-effects'; +import { SPECIAL_EFFECTS } from '../effects/special-effects'; import type { ComputedEffects } from '../effects/upgrade-effects.types'; // ─── Helpers ───────────────────────────────────────────────────────────────── diff --git a/src/lib/game/__tests__/room-utils-floor-state.test.ts b/src/lib/game/__tests__/room-utils-floor-state.test.ts index 3be2267..c01c9c5 100644 --- a/src/lib/game/__tests__/room-utils-floor-state.test.ts +++ b/src/lib/game/__tests__/room-utils-floor-state.test.ts @@ -1,6 +1,6 @@ import { describe, it, expect } from 'vitest'; import { generateFloorState } from '../utils/room-utils'; -import { PUZZLE_ROOMS, SWARM_CONFIG, SPEED_ROOM_CONFIG } from '../constants'; +import { SWARM_CONFIG } from '../constants'; import { getGuardianForFloor } from '../data/guardian-encounters'; import { getFloorMaxHP } from '../utils/floor-utils'; import { getDodgeChance } from '../utils/room-utils'; diff --git a/src/lib/game/__tests__/room-utils.test.ts b/src/lib/game/__tests__/room-utils.test.ts index 21c661c..01055ea 100644 --- a/src/lib/game/__tests__/room-utils.test.ts +++ b/src/lib/game/__tests__/room-utils.test.ts @@ -5,7 +5,7 @@ import { getDodgeChance, getPuzzleProgressSpeed, } from '../utils/room-utils'; -import { PUZZLE_ROOMS, SWARM_CONFIG, SPEED_ROOM_CONFIG, FLOOR_ARMOR_CONFIG } from '../constants'; +import { PUZZLE_ROOMS, SPEED_ROOM_CONFIG, FLOOR_ARMOR_CONFIG } from '../constants'; import { getAllGuardianFloors } from '../data/guardian-encounters'; // ─── generateRoomType ───────────────────────────────────────────────────────── diff --git a/src/lib/game/crafting-design.ts b/src/lib/game/crafting-design.ts index 857cbbe..d3dfe15 100644 --- a/src/lib/game/crafting-design.ts +++ b/src/lib/game/crafting-design.ts @@ -2,12 +2,11 @@ // Design system functions: calculateDesignTime, capacity cost, XP, etc. import type { EnchantmentDesign, DesignEffect, AppliedEnchantment, DesignProgress } from './types'; -import type { EquipmentInstance } from './types'; import type { ComputedEffects } from './effects/upgrade-effects.types'; import { calculateEnchantingXP } from './data/attunements'; import { ENCHANTMENT_EFFECTS, calculateEffectCapacityCost } from './data/enchantment-effects'; import { hasSpecial, SPECIAL_EFFECTS } from './effects/special-effects'; -import { EQUIPMENT_TYPES, type EquipmentCategory } from './data/equipment'; +import { EQUIPMENT_TYPES } from './data/equipment'; // ─── Design Creation & Calculation ────────────────────────────────────────── diff --git a/src/lib/game/crafting-equipment.ts b/src/lib/game/crafting-equipment.ts index 3ae409f..9e892ce 100644 --- a/src/lib/game/crafting-equipment.ts +++ b/src/lib/game/crafting-equipment.ts @@ -4,7 +4,6 @@ import type { EquipmentInstance, EquipmentCraftingProgress } from './types'; import { CRAFTING_RECIPES, canCraftRecipe, type CraftingRecipe } from './data/crafting-recipes'; import { EQUIPMENT_TYPES } from './data/equipment'; -import { generateInstanceId } from './crafting-utils'; import { ok, fail, ErrorCode } from './utils/result'; import type { Result } from './utils/result'; diff --git a/src/lib/game/crafting-loot.ts b/src/lib/game/crafting-loot.ts index ebbe026..823bd5c 100644 --- a/src/lib/game/crafting-loot.ts +++ b/src/lib/game/crafting-loot.ts @@ -125,7 +125,7 @@ export function removeBlueprint(inventory: LootInventory, blueprintId: string): } // Check and remove consumed blueprint (if single-use) -export function consumeBlueprint(inventory: LootInventory, blueprintId: string): LootInventory { +export function consumeBlueprint(inventory: LootInventory, _blueprintId: string): LootInventory { // Blueprints are persistent for now, but this function provides future flexibility return inventory; } diff --git a/src/lib/game/crafting-utils.ts b/src/lib/game/crafting-utils.ts index 4815673..888b2f8 100644 --- a/src/lib/game/crafting-utils.ts +++ b/src/lib/game/crafting-utils.ts @@ -3,7 +3,7 @@ import type { EquipmentInstance, EnchantmentDesign } from './types'; import { EQUIPMENT_TYPES, type EquipmentCategory, type EquipmentSlot } from './data/equipment'; -import { CRAFTING_RECIPES, canCraftRecipe, type CraftingRecipe } from './data/crafting-recipes'; +import { type CraftingRecipe } from './data/crafting-recipes'; // ─── Instance/ID Generation ────────────────────────────────────────────────── diff --git a/src/lib/game/data/crafting-recipes.ts b/src/lib/game/data/crafting-recipes.ts old mode 100755 new mode 100644 index c4d86d0..4bcd312 --- a/src/lib/game/data/crafting-recipes.ts +++ b/src/lib/game/data/crafting-recipes.ts @@ -1,8 +1,6 @@ // ─── Crafting Recipes ───────────────────────────────────────────────────────── // Defines what materials are needed to craft equipment from blueprints -import type { EquipmentSlot } from './equipment/types'; - export interface CraftingRecipe { id: string; // Blueprint ID (matches loot drop) equipmentTypeId: string; // Resulting equipment type ID diff --git a/src/lib/game/data/enchantments/defense-effects.ts b/src/lib/game/data/enchantments/defense-effects.ts index 40af153..bfe7bd3 100644 --- a/src/lib/game/data/enchantments/defense-effects.ts +++ b/src/lib/game/data/enchantments/defense-effects.ts @@ -2,7 +2,6 @@ // All defense-related enchantment effects that can be applied to equipment // Currently empty - no defense effects defined in the original enchantment-effects.ts -import type { EquipmentCategory } from '../equipment' import type { EnchantmentEffectDef } from '../enchantment-types' export const DEFENSE_EFFECTS: Record = {}; diff --git a/src/lib/game/effects.ts b/src/lib/game/effects.ts old mode 100755 new mode 100644 index a105629..785f13f --- a/src/lib/game/effects.ts +++ b/src/lib/game/effects.ts @@ -7,7 +7,6 @@ import type { EquipmentInstance } from './types'; import { ENCHANTMENT_EFFECTS } from './data/enchantment-effects'; import { computeEffects } from './effects/upgrade-effects'; -import { hasSpecial, SPECIAL_EFFECTS } from './effects/special-effects'; import { computeDisciplineEffects } from './effects/discipline-effects'; import type { ComputedEffects } from './effects/upgrade-effects.types'; diff --git a/src/lib/game/effects/upgrade-effects.ts b/src/lib/game/effects/upgrade-effects.ts old mode 100755 new mode 100644 index 71fea01..29e0fa0 --- a/src/lib/game/effects/upgrade-effects.ts +++ b/src/lib/game/effects/upgrade-effects.ts @@ -8,7 +8,7 @@ import type { ActiveUpgradeEffect, ComputedEffects } from './upgrade-effects.typ // ─── Upgrade Definition Cache ─────────────────────────── // No-op: skill evolution paths have been removed -function buildUpgradeCache(): void { +function _buildUpgradeCache(): void { // No-op: no upgrade definitions to cache } diff --git a/src/lib/game/hooks/useGameDerived.ts b/src/lib/game/hooks/useGameDerived.ts old mode 100755 new mode 100644 index 83f7098..364c92d --- a/src/lib/game/hooks/useGameDerived.ts +++ b/src/lib/game/hooks/useGameDerived.ts @@ -27,7 +27,7 @@ import { hasSpecial, SPECIAL_EFFECTS } from '../effects/special-effects'; */ export function useManaStats() { const prestigeUpgrades = usePrestigeStore((s) => s.prestigeUpgrades); - const rawMana = useManaStore((s) => s.rawMana); + const _rawMana = useManaStore((s) => s.rawMana); const meditateTicks = useManaStore((s) => s.meditateTicks); const day = useGameStore((s) => s.day); const hour = useGameStore((s) => s.hour); diff --git a/src/lib/game/stores/attunementStore.ts b/src/lib/game/stores/attunementStore.ts index 16ca3ae..d6f4fd6 100644 --- a/src/lib/game/stores/attunementStore.ts +++ b/src/lib/game/stores/attunementStore.ts @@ -5,7 +5,7 @@ import { create } from 'zustand'; import { persist } from 'zustand/middleware'; import { createSafeStorage } from '../utils/safe-persist'; import type { AttunementState } from '../types'; -import { ATTUNEMENTS_DEF, getAttunementXPForLevel, MAX_ATTUNEMENT_LEVEL } from '../data/attunements'; +import { getAttunementXPForLevel, MAX_ATTUNEMENT_LEVEL } from '../data/attunements'; export interface AttunementStoreState { attunements: Record; diff --git a/src/lib/game/stores/combat-actions.ts b/src/lib/game/stores/combat-actions.ts index ecadadf..83cad4d 100644 --- a/src/lib/game/stores/combat-actions.ts +++ b/src/lib/game/stores/combat-actions.ts @@ -8,7 +8,6 @@ import type { CombatStore, CombatState } from './combat-state.types'; import type { SpellState } from '../types'; import { getFloorMaxHP, getFloorElement, calcDamage, canAffordSpellCost, deductSpellCost } from '../utils'; import { computeDisciplineEffects } from '../effects/discipline-effects'; -import { ErrorCode } from '../utils/result'; /** * Create a default CombatTickResult for safe fallback on error. diff --git a/src/lib/game/stores/combatStore.ts b/src/lib/game/stores/combatStore.ts old mode 100755 new mode 100644 index 38a08cb..2e85f5d --- a/src/lib/game/stores/combatStore.ts +++ b/src/lib/game/stores/combatStore.ts @@ -6,7 +6,6 @@ import { persist } from 'zustand/middleware'; import { createSafeStorage } from '../utils/safe-persist'; import type { GameAction, SpellState, FloorState, GolemancyState, ActivityLogEntry, AchievementState, EquipmentSpellState, ActivityEventType } from '../types'; import { getFloorMaxHP } from '../utils'; -import { usePrestigeStore } from './prestigeStore'; import { generateFloorState } from '../utils/room-utils'; import { addActivityLogEntry } from '../utils/activity-log'; import { processCombatTick, makeInitialSpells } from './combat-actions'; diff --git a/src/lib/game/stores/craftingStore.ts b/src/lib/game/stores/craftingStore.ts index 7d99989..bee8aa6 100644 --- a/src/lib/game/stores/craftingStore.ts +++ b/src/lib/game/stores/craftingStore.ts @@ -1,7 +1,6 @@ // ─── Crafting Store ───────────────────────────────────────────────────── import { create } from 'zustand'; import { persist } from 'zustand/middleware'; -import type { DesignProgress, EnchantmentDesign, DesignEffect } from '../types'; import type { EquipmentSlot } from '../types/equipmentSlot'; import type { CraftingStore, CraftingState } from './craftingStore.types'; import * as CraftingUtils from '../crafting-utils'; @@ -16,7 +15,6 @@ import * as CraftingEquipment from '../crafting-equipment'; import { equipItem as equipItemAction, unequipItem as unequipItemAction } from '../crafting-actions/equipment-actions'; import { ErrorCode } from '../utils/result'; import { createSafeStorage } from '../utils/safe-persist'; -import type { Result } from '../utils/result'; import { createInitialEquipmentInstances } from './crafting-initial-state'; export const useCraftingStore = create()( diff --git a/src/lib/game/stores/discipline-slice.ts b/src/lib/game/stores/discipline-slice.ts index ccb644b..04a4261 100644 --- a/src/lib/game/stores/discipline-slice.ts +++ b/src/lib/game/stores/discipline-slice.ts @@ -6,10 +6,9 @@ import type { DisciplineState } from '../types/disciplines'; import type { ElementState } from '../types'; import { calculateManaDrain, - calculateStatBonus, canProceedDiscipline, checkDisciplinePrerequisites, - getUnlockedPerks, + getUnlockedPerks } from '../utils/discipline-math'; import { baseDisciplines } from '../data/disciplines/base'; import { elementalAttunementDisciplines } from '../data/disciplines/elemental'; diff --git a/src/lib/game/stores/gameActions.ts b/src/lib/game/stores/gameActions.ts index f54ab2a..202b6eb 100644 --- a/src/lib/game/stores/gameActions.ts +++ b/src/lib/game/stores/gameActions.ts @@ -5,7 +5,6 @@ import { usePrestigeStore } from './prestigeStore'; import { useManaStore } from './manaStore'; import { useCombatStore } from './combatStore'; import { computeDisciplineEffects } from '../effects/discipline-effects'; -import { useDisciplineStore } from './discipline-slice'; export const createResetGame = (set: (state: Partial) => void, initialState: GameCoordinatorState) => () => { // Clear all persisted state diff --git a/src/lib/game/stores/gameHooks.ts b/src/lib/game/stores/gameHooks.ts index fb30cba..11451d8 100644 --- a/src/lib/game/stores/gameHooks.ts +++ b/src/lib/game/stores/gameHooks.ts @@ -2,11 +2,8 @@ import { useEffect } from 'react'; import { useGameStore } from './gameStore'; import { useManaStore } from './manaStore'; import { usePrestigeStore } from './prestigeStore'; -import { useCombatStore } from './combatStore'; -import { useUIStore } from './uiStore'; import { useCraftingStore } from './craftingStore'; -import { useDisciplineStore } from './discipline-slice'; -import { getUnifiedEffects, type UnifiedEffects } from '../effects'; +import { getUnifiedEffects } from '../effects'; import { computeDisciplineEffects } from '../effects/discipline-effects'; import { computeMaxMana, diff --git a/src/lib/game/stores/gameLoopActions.ts b/src/lib/game/stores/gameLoopActions.ts index 913f90e..5007686 100644 --- a/src/lib/game/stores/gameLoopActions.ts +++ b/src/lib/game/stores/gameLoopActions.ts @@ -7,7 +7,6 @@ import { usePrestigeStore } from './prestigeStore'; import { useManaStore } from './manaStore'; import { useCombatStore } from './combatStore'; import { computeDisciplineEffects } from '../effects/discipline-effects'; -import { useDisciplineStore } from './discipline-slice'; export const createStartNewLoop = (set: (state: Partial) => void) => () => { const prestigeState = usePrestigeStore.getState(); diff --git a/src/lib/game/stores/gameStore.ts b/src/lib/game/stores/gameStore.ts old mode 100755 new mode 100644 index 0e71861..0c6c965 --- a/src/lib/game/stores/gameStore.ts +++ b/src/lib/game/stores/gameStore.ts @@ -4,7 +4,7 @@ import { create } from 'zustand'; import { persist } from 'zustand/middleware'; -import { TICK_MS, HOURS_PER_TICK, MAX_DAY, getStudySpeedMultiplier } from '../constants'; +import { HOURS_PER_TICK, MAX_DAY } from '../constants'; import { getGuardianForFloor } from '../data/guardian-encounters'; import { hasSpecial, SPECIAL_EFFECTS } from '../effects/special-effects'; import { computeEquipmentEffects } from '../effects'; @@ -14,19 +14,14 @@ import { computeDisciplineEffects } from '../effects/discipline-effects'; import { computeMaxMana, computeRegen, - getFloorElement, - getFloorMaxHP, getMeditationBonus, getIncursionStrength, - calcInsight, - calcDamage, - deductSpellCost, - canAffordSpellCost, + calcInsight } from '../utils'; import { useUIStore } from './uiStore'; import { usePrestigeStore } from './prestigeStore'; import { useManaStore } from './manaStore'; -import { useCombatStore, makeInitialSpells } from './combatStore'; +import { useCombatStore } from './combatStore'; import { useAttunementStore } from './attunementStore'; import { useCraftingStore } from './craftingStore'; import { useDisciplineStore } from './discipline-slice'; diff --git a/src/lib/game/stores/prestigeStore.ts b/src/lib/game/stores/prestigeStore.ts old mode 100755 new mode 100644 index 9aa934a..6467f5c --- a/src/lib/game/stores/prestigeStore.ts +++ b/src/lib/game/stores/prestigeStore.ts @@ -6,7 +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 { ok, okVoid, fail, ErrorCode } from '../utils/result'; +import { okVoid, fail, ErrorCode } from '../utils/result'; import type { Result } from '../utils/result'; // ─── Prestige State (data only) ────────────────────────────────────────────── diff --git a/src/lib/game/utils/room-utils.ts b/src/lib/game/utils/room-utils.ts index eb0fb5f..1302901 100644 --- a/src/lib/game/utils/room-utils.ts +++ b/src/lib/game/utils/room-utils.ts @@ -2,7 +2,15 @@ // Moved from store-modules/room-utils.ts to eliminate legacy dependencies import type { RoomType, FloorState, EnemyState } from '../types'; -import { FLOOR_ELEM_CYCLE, PUZZLE_ROOMS, PUZZLE_ROOM_INTERVAL, PUZZLE_ROOM_CHANCE, SWARM_ROOM_CHANCE, SPEED_ROOM_CHANCE, FLOOR_ARMOR_CONFIG, SWARM_CONFIG, SPEED_ROOM_CONFIG } from '../constants'; +import { + PUZZLE_ROOMS, + PUZZLE_ROOM_INTERVAL, + PUZZLE_ROOM_CHANCE, + SWARM_ROOM_CHANCE, + SPEED_ROOM_CHANCE, + FLOOR_ARMOR_CONFIG, + SPEED_ROOM_CONFIG +} from '../constants'; import { getGuardianForFloor } from '../data/guardian-encounters'; import { getFloorMaxHP } from './floor-utils'; import { getFloorElement } from './floor-utils'; diff --git a/src/lib/game/utils/spire-utils.ts b/src/lib/game/utils/spire-utils.ts index d6cd15d..2bbf0fa 100644 --- a/src/lib/game/utils/spire-utils.ts +++ b/src/lib/game/utils/spire-utils.ts @@ -2,7 +2,7 @@ // Spire-specific utility functions for room generation, enemy stat scaling, etc. import type { RoomType, FloorState, EnemyState } from '../types'; -import { FLOOR_ELEM_CYCLE, PUZZLE_ROOMS } from '../constants'; +import { PUZZLE_ROOMS } from '../constants'; import { getFloorMaxHP, getFloorElement } from './floor-utils'; import { getEnemyName } from './enemy-utils'; import { getGuardianForFloor, isGuardianFloor } from '../data/guardian-encounters'; @@ -62,7 +62,7 @@ export function generateSpireRoomType(floor: number, roomIndex: number, totalRoo return generateCombatRoomType(floor); } -function generateCombatRoomType(floor: number): RoomType { +function generateCombatRoomType(_floor: number): RoomType { const roll = Math.random(); if (roll < 0.12) return 'swarm'; if (roll < 0.22) return 'speed';