fix: add room enchantment indicator to EffectSelector for feet-only effects
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m23s
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m23s
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
# Circular Dependencies
|
# 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.
|
Found: 8 circular chain(s) — these MUST be fixed before modifying involved files.
|
||||||
|
|
||||||
1. 1) data/guardian-encounters.ts > data/guardian-procedural.ts
|
1. 1) data/guardian-encounters.ts > data/guardian-procedural.ts
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"_meta": {
|
"_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.",
|
"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."
|
||||||
},
|
},
|
||||||
@@ -614,6 +614,7 @@
|
|||||||
],
|
],
|
||||||
"stores/combat-reset.ts": [
|
"stores/combat-reset.ts": [
|
||||||
"stores/combat-actions.ts",
|
"stores/combat-actions.ts",
|
||||||
|
"stores/combat-channel.ts",
|
||||||
"stores/combat-state.types.ts",
|
"stores/combat-state.types.ts",
|
||||||
"types.ts",
|
"types.ts",
|
||||||
"utils/index.ts",
|
"utils/index.ts",
|
||||||
|
|||||||
@@ -5,8 +5,9 @@ import { Badge } from '@/components/ui/badge';
|
|||||||
import { ScrollArea } from '@/components/ui/scroll-area';
|
import { ScrollArea } from '@/components/ui/scroll-area';
|
||||||
import { Separator } from '@/components/ui/separator';
|
import { Separator } from '@/components/ui/separator';
|
||||||
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip';
|
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 { ENCHANTMENT_EFFECTS, calculateEffectCapacityCost } from '@/lib/game/data/enchantment-effects';
|
||||||
|
import { isRoomEnchantmentEffectId } from '@/lib/game/utils/room-enchantments-utils';
|
||||||
import type { EffectSelectorProps } from './types';
|
import type { EffectSelectorProps } from './types';
|
||||||
import { DebugName } from '@/components/game/debug/debug-context';
|
import { DebugName } from '@/components/game/debug/debug-context';
|
||||||
|
|
||||||
@@ -55,6 +56,7 @@ export function EffectSelector({
|
|||||||
{availableEffects.map(effect => {
|
{availableEffects.map(effect => {
|
||||||
const selected = selectedEffects.find(e => e.effectId === effect.id);
|
const selected = selectedEffects.find(e => e.effectId === effect.id);
|
||||||
const _cost = calculateEffectCapacityCost(effect.id, (selected?.stacks || 0) + 1, efficiencyBonus);
|
const _cost = calculateEffectCapacityCost(effect.id, (selected?.stacks || 0) + 1, efficiencyBonus);
|
||||||
|
const isRoomEnchant = isRoomEnchantmentEffectId(effect.id);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
@@ -62,12 +64,31 @@ export function EffectSelector({
|
|||||||
className={`p-2 rounded border transition-all
|
className={`p-2 rounded border transition-all
|
||||||
${selected
|
${selected
|
||||||
? 'border-[var(--mana-stellar)] bg-[var(--mana-stellar)]/10'
|
? 'border-[var(--mana-stellar)] bg-[var(--mana-stellar)]/10'
|
||||||
|
: isRoomEnchant
|
||||||
|
? 'border-[var(--mana-fire)]/40 bg-[var(--mana-fire)]/5'
|
||||||
: 'border-[var(--border-default)] bg-[var(--bg-sunken)]/50'
|
: 'border-[var(--border-default)] bg-[var(--bg-sunken)]/50'
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
<div className="flex justify-between items-start">
|
<div className="flex justify-between items-start">
|
||||||
<div className="flex-1">
|
<div className="flex-1">
|
||||||
<div className="text-sm font-semibold text-[var(--text-primary)]">{effect.name}</div>
|
<div className="text-sm font-semibold text-[var(--text-primary)]">
|
||||||
|
{effect.name}
|
||||||
|
{isRoomEnchant && (
|
||||||
|
<TooltipProvider>
|
||||||
|
<Tooltip>
|
||||||
|
<TooltipTrigger asChild>
|
||||||
|
<span className="ml-1.5 inline-flex items-center gap-0.5 cursor-help">
|
||||||
|
<Sparkles className="w-3 h-3 text-[var(--mana-fire)]" />
|
||||||
|
</span>
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent className="bg-[var(--bg-elevated)] border-[var(--border-default)] text-[var(--text-primary)]">
|
||||||
|
<p className="font-semibold text-[var(--mana-fire)]">Room Enchantment</p>
|
||||||
|
<p className="text-xs text-[var(--text-muted)] mt-1">Creates an environmental aura effect that scales with room coverage. Only available on feet equipment.</p>
|
||||||
|
</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
</TooltipProvider>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
<div className="text-xs text-[var(--text-muted)]">{effect.description}</div>
|
<div className="text-xs text-[var(--text-muted)]">{effect.description}</div>
|
||||||
<div className="text-xs text-[var(--text-disabled)] mt-1">
|
<div className="text-xs text-[var(--text-disabled)] mt-1">
|
||||||
Cost: {effect.baseCapacityCost} cap | Max: {effect.maxStacks}
|
Cost: {effect.baseCapacityCost} cap | Max: {effect.maxStacks}
|
||||||
@@ -95,11 +116,18 @@ export function EffectSelector({
|
|||||||
</ActionButton>
|
</ActionButton>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="flex gap-1 mt-1">
|
||||||
{selected && (
|
{selected && (
|
||||||
<Badge variant="outline" className="mt-1 text-xs border-[var(--mana-stellar)] text-[var(--mana-stellar)]">
|
<Badge variant="outline" className="text-xs border-[var(--mana-stellar)] text-[var(--mana-stellar)]">
|
||||||
{selected.stacks}/{effect.maxStacks}
|
{selected.stacks}/{effect.maxStacks}
|
||||||
</Badge>
|
</Badge>
|
||||||
)}
|
)}
|
||||||
|
{isRoomEnchant && (
|
||||||
|
<Badge variant="outline" className="text-xs border-[var(--mana-fire)]/60 text-[var(--mana-fire)]">
|
||||||
|
Room
|
||||||
|
</Badge>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
|
|||||||
@@ -57,6 +57,30 @@ export function isRoomEnchantmentSpecialId(specialId: string): boolean {
|
|||||||
return ROOM_ENCHANTMENT_SPECIAL_IDS.has(specialId);
|
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.
|
* Get the base magnitude for a room enchantment specialId.
|
||||||
* These are the tick-level effect strengths at 100% coverage.
|
* These are the tick-level effect strengths at 100% coverage.
|
||||||
|
|||||||
Reference in New Issue
Block a user