The first square of a two-square spell now shows on the board

Dimensional Warp, Trader, Redirection, and Relocate Sector all take
two clicks, but only the hint bar acknowledged the first — the board
itself sat unchanged until the second click landed. The first chosen
square now wears a pulsing amber dashed ring (same rhythm as the warp
destination ring, still under prefers-reduced-motion) until the spell
completes or is cancelled.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Eric Wagoner
2026-08-16 10:17:57 -04:00
co-authored by Claude Fable 5
parent f0a264147f
commit 57bd036417
2 changed files with 30 additions and 1 deletions
+1
View File
@@ -760,6 +760,7 @@
onPlayerClick={clickPlayer} onPlayerClick={clickPlayer}
onCreatureClick={clickCreature} onCreatureClick={clickCreature}
onWarpClick={clickWarp} onWarpClick={clickWarp}
markedCell={tradeFrom ?? pendingSectorFrom}
/> />
</section> </section>
+28
View File
@@ -14,6 +14,7 @@
onPlayerClick, onPlayerClick,
onCreatureClick, onCreatureClick,
onWarpClick, onWarpClick,
markedCell = null,
}: { }: {
view: GameView; view: GameView;
edgeSelectMode?: boolean; edgeSelectMode?: boolean;
@@ -23,6 +24,8 @@
onPlayerClick?: (playerId: string) => void; onPlayerClick?: (playerId: string) => void;
onCreatureClick?: (creatureId: string) => void; onCreatureClick?: (creatureId: string) => void;
onWarpClick?: (cell: { x: number; y: number }, side: Side) => void; onWarpClick?: (cell: { x: number; y: number }, side: Side) => void;
/** First square of a two-square spell: marked so the click reads as taken. */
markedCell?: { x: number; y: number } | null;
} = $props(); } = $props();
const PLAYER_COLORS = ["#1a9c46", "#d3352b", "#c9308f", "#3a3ac0", "#2ab0c9", "#c9a72a"]; const PLAYER_COLORS = ["#1a9c46", "#d3352b", "#c9308f", "#3a3ac0", "#2ab0c9", "#c9a72a"];
@@ -326,6 +329,15 @@
{/if} {/if}
{/each} {/each}
<!-- first square of a two-square spell -->
{#if markedCell}
<rect
x={markedCell.x * CELL + 3} y={markedCell.y * CELL + 3}
width={CELL - 6} height={CELL - 6}
rx="6" class="marked-cell"
/>
{/if}
<!-- wizards --> <!-- wizards -->
{#each [...wizardsByCell.entries()] as [key, group] (key)} {#each [...wizardsByCell.entries()] as [key, group] (key)}
{#each group as p, i (p.id)} {#each group as p, i (p.id)}
@@ -507,6 +519,14 @@
fill: #6a5c44; fill: #6a5c44;
pointer-events: none; pointer-events: none;
} }
.marked-cell {
fill: rgba(211, 133, 43, 0.18);
stroke: #d3852b;
stroke-width: 2.5;
stroke-dasharray: 7 4;
pointer-events: none;
animation: warp-pulse 1.6s ease-in-out infinite;
}
.warp-dest { .warp-dest {
fill: none; fill: none;
stroke: #2e7d32; stroke: #2e7d32;
@@ -520,6 +540,14 @@
50% { opacity: 0.35; } 50% { opacity: 0.35; }
} }
@media (prefers-reduced-motion: reduce) { @media (prefers-reduced-motion: reduce) {
.marked-cell {
fill: rgba(211, 133, 43, 0.18);
stroke: #d3852b;
stroke-width: 2.5;
stroke-dasharray: 7 4;
pointer-events: none;
animation: warp-pulse 1.6s ease-in-out infinite;
}
.warp-dest { animation: none; } .warp-dest { animation: none; }
} }
.wizard { cursor: pointer; } .wizard { cursor: pointer; }