From 83106bf37d60099ce387b80a8b37f4fdbbf2491e Mon Sep 17 00:00:00 2001 From: n8n-gitea Date: Mon, 15 Jun 2026 13:06:36 +0200 Subject: [PATCH] fix: add room enchantment indicator to EffectSelector for feet-only effects --- docs/circular-deps.txt | 2 +- docs/dependency-graph.json | 3 +- .../EnchantmentDesigner/EffectSelector.tsx | 44 +++++++++++++++---- src/lib/game/utils/room-enchantments-utils.ts | 24 ++++++++++ 4 files changed, 63 insertions(+), 10 deletions(-) diff --git a/docs/circular-deps.txt b/docs/circular-deps.txt index c4221b6..89fd740 100644 --- a/docs/circular-deps.txt +++ b/docs/circular-deps.txt @@ -1,5 +1,5 @@ # Circular Dependencies -Generated: 2026-06-15T10:13:15.747Z +Generated: 2026-06-15T10:29:07.349Z Found: 8 circular chain(s) — these MUST be fixed before modifying involved files. 1. 1) data/guardian-encounters.ts > data/guardian-procedural.ts diff --git a/docs/dependency-graph.json b/docs/dependency-graph.json index 12f2754..78e99b1 100644 --- a/docs/dependency-graph.json +++ b/docs/dependency-graph.json @@ -1,6 +1,6 @@ { "_meta": { - "generated": "2026-06-15T10:13:13.518Z", + "generated": "2026-06-15T10:29:05.083Z", "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." }, @@ -614,6 +614,7 @@ ], "stores/combat-reset.ts": [ "stores/combat-actions.ts", + "stores/combat-channel.ts", "stores/combat-state.types.ts", "types.ts", "utils/index.ts", diff --git a/src/components/game/crafting/EnchantmentDesigner/EffectSelector.tsx b/src/components/game/crafting/EnchantmentDesigner/EffectSelector.tsx index 48384eb..477a28f 100644 --- a/src/components/game/crafting/EnchantmentDesigner/EffectSelector.tsx +++ b/src/components/game/crafting/EnchantmentDesigner/EffectSelector.tsx @@ -5,8 +5,9 @@ import { Badge } from '@/components/ui/badge'; import { ScrollArea } from '@/components/ui/scroll-area'; import { Separator } from '@/components/ui/separator'; import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip'; -import { AlertCircle, Wand2, Plus, Minus } from 'lucide-react'; +import { AlertCircle, Wand2, Plus, Minus, Sparkles } from 'lucide-react'; import { ENCHANTMENT_EFFECTS, calculateEffectCapacityCost } from '@/lib/game/data/enchantment-effects'; +import { isRoomEnchantmentEffectId } from '@/lib/game/utils/room-enchantments-utils'; import type { EffectSelectorProps } from './types'; import { DebugName } from '@/components/game/debug/debug-context'; @@ -55,6 +56,7 @@ export function EffectSelector({ {availableEffects.map(effect => { const selected = selectedEffects.find(e => e.effectId === effect.id); const _cost = calculateEffectCapacityCost(effect.id, (selected?.stacks || 0) + 1, efficiencyBonus); + const isRoomEnchant = isRoomEnchantmentEffectId(effect.id); return (
-
{effect.name}
+
+ {effect.name} + {isRoomEnchant && ( + + + + + + + + +

Room Enchantment

+

Creates an environmental aura effect that scales with room coverage. Only available on feet equipment.

+
+
+
+ )} +
{effect.description}
Cost: {effect.baseCapacityCost} cap | Max: {effect.maxStacks} @@ -95,11 +116,18 @@ export function EffectSelector({
- {selected && ( - - {selected.stacks}/{effect.maxStacks} - - )} +
+ {selected && ( + + {selected.stacks}/{effect.maxStacks} + + )} + {isRoomEnchant && ( + + Room + + )} +
); })} diff --git a/src/lib/game/utils/room-enchantments-utils.ts b/src/lib/game/utils/room-enchantments-utils.ts index b72e992..3e37d93 100644 --- a/src/lib/game/utils/room-enchantments-utils.ts +++ b/src/lib/game/utils/room-enchantments-utils.ts @@ -57,6 +57,30 @@ export function isRoomEnchantmentSpecialId(specialId: string): boolean { return ROOM_ENCHANTMENT_SPECIAL_IDS.has(specialId); } +/** + * Set of enchantment effect IDs that are room enchantment effects. + * These are the keys in SPECIAL_EFFECTS / ENCHANTMENT_EFFECTS whose + * effect.specialId is a room enchantment. + */ +const ROOM_ENCHANTMENT_EFFECT_IDS = new Set([ + 'boots_sigil_fire', + 'boots_sigil_frost', + 'boots_sigil_death', + 'boots_sigil_lightning', + 'boots_sigil_dark', + 'boots_sigil_earth', + 'boots_sigil_transference_ground', + 'boots_sigil_transference_path', +]); + +/** + * Check if an enchantment effect ID is a room enchantment effect. + * Use this in the EffectSelector to tag room enchantments. + */ +export function isRoomEnchantmentEffectId(effectId: string): boolean { + return ROOM_ENCHANTMENT_EFFECT_IDS.has(effectId); +} + /** * Get the base magnitude for a room enchantment specialId. * These are the tick-level effect strengths at 100% coverage.