From 2de6e1f6ba72390024c28150b815710c98081583 Mon Sep 17 00:00:00 2001 From: Eric Wagoner Date: Tue, 27 Oct 2026 18:03:02 -0400 Subject: [PATCH] The status line on your move says what the other side just did, in place of "Checkmate their King", which told the player nothing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "Vritra’s Warrior went to 2a2.", "took the Hero on 2e5", "struck 2g4 from the air", "and is a Hero now"; "The first move is yours." before any move. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01CCLa2PaEeCj8njQZSWGqHx --- src/lib/components/Board.svelte | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/lib/components/Board.svelte b/src/lib/components/Board.svelte index 36b71c8..a9c6478 100644 --- a/src/lib/components/Board.svelte +++ b/src/lib/components/Board.svelte @@ -116,6 +116,16 @@ } const shownStory = $derived(shownPly > 0 ? storyOf(shownPly) : ''); + /** What the other side just did, in a few words, for the status line when it is your move. */ + const lastLine = $derived.by(() => { + const m = g.moves.at(-1); + if (!m) return ''; + const who = nameOfSide(m.by); + if (m.afar) return `${who}’s Dragon struck ${squareName(m.to)} from the air.`; + const did = m.captured ? `took the ${NAMES[m.captured]} on` : 'went to'; + return `${who}’s ${NAMES[m.kind]} ${did} ${squareName(m.to)}${m.promoted ? ' and is a Hero now' : ''}.`; + }); + // --- Choosing and moving --- let selected = $state(null); const targets = $derived(selected === null ? [] : legalMovesFrom(g.cells, selected, g.setup)); @@ -200,7 +210,7 @@ {:else if room.spectating} {nameOfSide(g.toMove)} to move · {SIDE_NAMES[g.toMove]}{#if inCheckNow} · in check{/if} · move {g.moves.length + 1} {:else if yourMove} - Your move · {SIDE_NAMES[mySide!]}{#if inCheckNow} · your King is in check{/if} · Checkmate {nameOfSide(g.toMove === 'gold' ? 'scarlet' : 'gold')}’s King. + Your move · {SIDE_NAMES[mySide!]}{#if inCheckNow} · your King is in check{/if} · {lastLine || 'The first move is yours.'} {:else if room.view.playingOn} The drakes play on · a move every few seconds  {:else} @@ -302,7 +312,7 @@ color: var(--ember); } - .goal { + .last { color: var(--bone); }