Live interrupts announce themselves
Interrupt and Opportunity Fire were fully playable out of turn — tap the card while another wizard acts — but nothing said so, and cards are otherwise inert out of turn, so playtesters never tried. Now, whenever the moment is live (someone else's turn, no attack or chaos pending, past round one, not hotseat), those cards wear a pulsing golden glow in your hand and the rail says to tap one. The glow respects prefers-reduced-motion. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
b210cffa76
commit
45803a2664
@@ -89,6 +89,16 @@
|
||||
const youMustDiscard = $derived(view != null && view.pendingDiscard === view.you);
|
||||
const youMustShield = $derived(view?.chaosPending?.queue[0] === view?.you && view != 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(
|
||||
view != null && !isYourTurn && !view.stack && !view.chaosPending &&
|
||||
!view.outOfTurnWindow && view.phase === "playing" && view.turn.round > 1 && !local.active,
|
||||
);
|
||||
const interruptCards = $derived(
|
||||
canInterruptNow
|
||||
? view!.yourHand.filter((c) => c.cardId === "interrupt" || c.cardId === "opportunity-fire")
|
||||
: [],
|
||||
);
|
||||
|
||||
const selectedDef = $derived(selectedCard ? cardDef(selectedCard.cardId) : null);
|
||||
const EDGE_CARDS = new Set([
|
||||
@@ -1004,6 +1014,11 @@
|
||||
{:else}
|
||||
<div class="slip">{view.activePlayerId} is taking their turn…</div>
|
||||
{/if}
|
||||
{#if interruptCards.length > 0}
|
||||
<div class="slip urgent">
|
||||
⚡ Your {cardDef(interruptCards[0]!.cardId).name} can seize this moment — tap the glowing card.
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{#if view.yourWardArmed}
|
||||
<div class="slip ambush-note">🗡 Your ward is set — a thief who grabs your treasure bleeds for 3.</div>
|
||||
@@ -1272,6 +1287,7 @@
|
||||
attachedMods.some((m) => m.instanceId === card.instanceId)}
|
||||
marked={discardSelection.has(card.instanceId)}
|
||||
displayed={view.players.find((p) => p.id === view.you)?.displayed.some((c) => c.instanceId === card.instanceId) ?? false}
|
||||
glowing={interruptCards.some((c) => c.instanceId === card.instanceId)}
|
||||
charges={view.wandCharges[card.instanceId] ?? null}
|
||||
onclick={() => selectCard(card)}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user