From 9eeb89caca4c8413da867d461fa03e66801a6623 Mon Sep 17 00:00:00 2001 From: Eric Wagoner Date: Tue, 18 Aug 2026 10:36:41 -0400 Subject: [PATCH] Every edge answers a hover: tooltips for walls, doors, fire, illusions Only the special door lock states carried titles. Now plain walls ('a wall'), locked doors, the wall of fire (with its 4-damage warning), the untested shimmer ('tap to test your eyes'), the known-illusion ghost, and battle cracks (damage taken so far) all speak on hover. The firewall's hover target is its bar; the flames stay click-through. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_0138A8CjeQRpvzKxuMfz1Bqc --- packages/web/src/Board.svelte | 8 ++++---- packages/web/src/EdgeGlyph.svelte | 5 +++-- packages/web/src/FirewallEdge.svelte | 5 +++-- packages/web/src/IllusionShimmer.svelte | 2 +- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/packages/web/src/Board.svelte b/packages/web/src/Board.svelte index 05dd4b3..ce8c1f4 100644 --- a/packages/web/src/Board.svelte +++ b/packages/web/src/Board.svelte @@ -408,10 +408,10 @@ {@const frac = Math.min(1, dmg / 20)} {#if kind === "V"} + class="crack" style:opacity={0.35 + frac * 0.65}>battle-scarred — {dmg} damage taken {:else} + class="crack" style:opacity={0.35 + frac * 0.65}>battle-scarred — {dmg} damage taken {/if} {/each} @@ -421,9 +421,9 @@ {@const ix = Number(key.split(":")[1]?.split(",")[0])} {@const iy = Number(key.split(":")[1]?.split(",")[1])} {#if kind === "V"} - + an illusion — your eyes see through it {:else} - + an illusion — your eyes see through it {/if} {/each} diff --git a/packages/web/src/EdgeGlyph.svelte b/packages/web/src/EdgeGlyph.svelte index d018eba..71bd68f 100644 --- a/packages/web/src/EdgeGlyph.svelte +++ b/packages/web/src/EdgeGlyph.svelte @@ -11,6 +11,7 @@ const CELL = 48; const WALL = 7; const cls = $derived(state === "door" ? `door${lock ? ` ${lock}` : ""}` : "wall"); + const tip = $derived(title ?? (state === "door" ? "a locked door" : "a wall")); {#if kind === "V"} @@ -18,13 +19,13 @@ x={(x + 1) * CELL - WALL / 2} y={y * CELL - WALL / 2} width={WALL} height={CELL + WALL} class={cls} - >{#if title}{title}{/if} + >{tip} {:else} {#if title}{title}{/if} + >{tip} {/if}