[priority: medium] EffectSelector shows "Learn Enchanting skill" instead of checking attunement level #188

Closed
opened 2026-05-28 15:57:24 +02:00 by Anexim · 2 comments
Owner

Bug: EffectSelector shows outdated "Learn Enchanting skill" message

Description

In the Crafting tab > Enchanter subtab > Design phase, the EffectSelector component shows:

"Learn Enchanting skill to design enchantments"

This message is outdated — there is no longer an "Enchanting skill" in the game. The game now uses attunements (Enchanter attunement level).

Root Cause Analysis

In EffectSelector.tsx line 29-33:

{enchantingLevel < 1 ? (
  <div className="text-center text-[var(--text-muted)] py-8">
    <Wand2 className="w-12 h-12 mx-auto mb-2 opacity-50 text-[var(--text-disabled)]" />
    <p>Learn Enchanting skill to design enchantments</p>
  </div>

The enchantingLevel prop is passed from EnchantmentDesigner.tsx as a hardcoded 0:

<EffectSelector
  ...
  enchantingLevel={0}
  ...
/>

So the condition enchantingLevel < 0 is ALWAYS true, and the message is always shown — even though the player starts with Enchanter attunement level 1.

Affected Files

  • src/components/game/crafting/EnchantmentDesigner/EffectSelector.tsx — the conditional display
  • src/components/game/crafting/EnchantmentDesigner.tsx — passes enchantingLevel={0}

Steps to Reproduce

  1. Open Crafting tab
  2. Go to Enchanter subtab
  3. Click "Design" phase
  4. See the "Learn Enchanting skill" message instead of the effect selector

Expected Behavior

  • The effect selector should be visible when the player has Enchanter attunement level >= 1
  • The message should reference attunements, not skills
  • Since the player starts with Enchanter level 1, the effect selector should be immediately visible

Suggested Fix Direction

  1. Replace enchantingLevel with the actual Enchanter attunement level from useAttunementStore
  2. Update the message to say "Reach Enchanter attunement level 1 to design enchantments" if needed
  3. Or simply remove the gate entirely since Enchanter is the starting attunement
## Bug: EffectSelector shows outdated "Learn Enchanting skill" message ### Description In the Crafting tab > Enchanter subtab > Design phase, the EffectSelector component shows: > "Learn Enchanting skill to design enchantments" This message is outdated — there is no longer an "Enchanting skill" in the game. The game now uses attunements (Enchanter attunement level). ### Root Cause Analysis In `EffectSelector.tsx` line 29-33: ```tsx {enchantingLevel < 1 ? ( <div className="text-center text-[var(--text-muted)] py-8"> <Wand2 className="w-12 h-12 mx-auto mb-2 opacity-50 text-[var(--text-disabled)]" /> <p>Learn Enchanting skill to design enchantments</p> </div> ``` The `enchantingLevel` prop is passed from `EnchantmentDesigner.tsx` as a hardcoded `0`: ```tsx <EffectSelector ... enchantingLevel={0} ... /> ``` So the condition `enchantingLevel < 0` is ALWAYS true, and the message is always shown — even though the player starts with Enchanter attunement level 1. ### Affected Files - `src/components/game/crafting/EnchantmentDesigner/EffectSelector.tsx` — the conditional display - `src/components/game/crafting/EnchantmentDesigner.tsx` — passes `enchantingLevel={0}` ### Steps to Reproduce 1. Open Crafting tab 2. Go to Enchanter subtab 3. Click "Design" phase 4. See the "Learn Enchanting skill" message instead of the effect selector ### Expected Behavior - The effect selector should be visible when the player has Enchanter attunement level >= 1 - The message should reference attunements, not skills - Since the player starts with Enchanter level 1, the effect selector should be immediately visible ### Suggested Fix Direction 1. Replace `enchantingLevel` with the actual Enchanter attunement level from `useAttunementStore` 2. Update the message to say "Reach Enchanter attunement level 1 to design enchantments" if needed 3. Or simply remove the gate entirely since Enchanter is the starting attunement
Anexim added the ai:todo label 2026-05-28 15:57:24 +02:00
n8n-gitea was assigned by Anexim 2026-05-28 15:57:24 +02:00
Author
Owner

Starting work on issue #188. Root cause identified: EnchantmentDesigner.tsx passes enchantingLevel={0} (hardcoded), so the "Learn Enchanting skill" message always shows. Fix: read actual Enchanter attunement level from useAttunementStore.

Starting work on issue #188. Root cause identified: `EnchantmentDesigner.tsx` passes `enchantingLevel={0}` (hardcoded), so the "Learn Enchanting skill" message always shows. Fix: read actual Enchanter attunement level from `useAttunementStore`.
Author
Owner

Fixed. EnchantmentDesigner.tsx now reads the actual Enchanter attunement level from useAttunementStore instead of hardcoding enchantingLevel={0}. The EffectSelector now shows immediately since the player starts with Enchanter level 1.

✅ Fixed. `EnchantmentDesigner.tsx` now reads the actual Enchanter attunement level from `useAttunementStore` instead of hardcoding `enchantingLevel={0}`. The EffectSelector now shows immediately since the player starts with Enchanter level 1.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Anexim/Mana-Loop#188