diff --git a/packages/web/src/App.svelte b/packages/web/src/App.svelte index 6bd71c4..cc15c37 100644 --- a/packages/web/src/App.svelte +++ b/packages/web/src/App.svelte @@ -108,6 +108,17 @@ ); const youMustDiscard = $derived(view != null && view.pendingDiscard === view.you); const youMustShield = $derived(view?.chaosPending?.queue[0] === view?.you && view != null); + /** Picking up an object ends the turn's actions: the hand goes quiet until + * the draw — but never while a counter, shield, or discard is owed. */ + const actionsSpent = $derived( + view != null && isYourTurn && view.turn.actionsEnded && + !youMustRespond && !youMustShield && !youMustDiscard, + ); + const commandedCreature = $derived( + selectedCreature && view + ? (view.creatures.find((c) => c.id === selectedCreature) ?? null) + : null, + ); const holdingWard = $derived(view?.yourHand.some((c) => c.cardId === "ward") ?? false); /** A live moment to interrupt: another wizard acts, no attack is pending. */ const canInterruptNow = $derived( @@ -228,6 +239,7 @@ discardSelection = next; return; } + if (actionsSpent) return; // picking up an object ended the turn's actions if (!isYourTurn) { // Live interruption: Interrupt / Opportunity Fire may be played during // another player's turn (when no attack is pending). @@ -571,15 +583,10 @@ } const mine = creature.controllerId === view.you || creature.kind === "democratic-monster"; if (mine) { - const selecting = selectedCreature !== creatureId; - selectedCreature = selecting ? creatureId : null; - if (selecting) { - peekCard = { instanceId: `peek-${creature.kind}`, cardId: creature.kind }; - peekCreatureId = creature.id; - } else { - peekCard = null; - peekCreatureId = null; - } + // Commanding your own creature docks its card in the rail instead of + // opening the centered peek — a modal would block the very board + // squares you are about to march it across. + selectedCreature = selectedCreature !== creatureId ? creatureId : null; } else { peekAt(creature.position); } @@ -1153,6 +1160,18 @@ Tap its token to command it. {/each} + {#if commandedCreature} +
+ (faqCardId = id)} + /> +
{creatureStats(commandedCreature)}
+
+ {/if} + {#if actionsSpent} +
Your spellwork is spent for this turn — all that remains is to draw and end it.
+ {/if} {#if view.yourAmbushes.length > 0} {#each view.yourAmbushes as a (a.id)} @@ -1258,7 +1277,7 @@ {#if sc} Commanding {cardDef(sc.kind).name} — {creatureStats(sc)}. Tap a square beside it to march, a target in its square to attack. - + {/if} {/if} {#if youMustRespond && view.stack} @@ -1427,7 +1446,7 @@ {/if} -
+
{#each view.phase === "finished" ? [] : view.yourHand as card (card.instanceId)} +