diff --git a/packages/web/src/App.svelte b/packages/web/src/App.svelte index 2937082..4a9416c 100644 --- a/packages/web/src/App.svelte +++ b/packages/web/src/App.svelte @@ -1312,6 +1312,7 @@ let councilHints = $state(null); async function askCouncil() { if (!view) return; + if (councilHints !== null) councilUnasked = false; // asked again: theirs to keep const { tableHints } = await import("./hints"); councilHints = tableHints(view); } @@ -1383,11 +1384,18 @@ /** On a first turn the council speaks unasked, once — a newcomer will * not know to ask, and a minute's silence is how they leave. */ let counciled = false; + /** The unasked advice is for that one turn: it leaves when the turn does. */ + let councilUnasked = false; $effect(() => { if (!view || !isYourTurn || prefs.coached || view.turn.round !== 1 || counciled || councilHints !== null) return; counciled = true; + councilUnasked = true; void askCouncil(); }); + $effect(() => { + if (!councilUnasked || !view) return; + if (!isYourTurn || view.turn.round !== 1) { councilHints = null; councilUnasked = false; } + }); /** Arrow keys and WASD walk on the board, as they do in the first-person * pane — that pane takes the keys itself while it is up. */