{#if view.winReason === "treasures"}
carried two stolen treasures home — the maze is theirs
{:else if view.winReason === "lastStanding"}
the last wizard standing
{:else}
wins the game
{/if}
{cardDef(ambushVia.cardId).name} — set an ambush
{#if !ambushTrigger}
springs when an opponent…
{:else if !ambushSpell}
— now tap the attack card to commit
{:else}
{cardDef(ambushSpell.cardId).name}{attachedNumber ? ` with a ${numberTotal}` : " (tap a number to power it)"}
{/if}
{#if selectedCreature && !selectedDef}
{@const sc = view.creatures.find((c) => c.id === selectedCreature)}
{#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}
{#if view.stack.defenderId === view.you && selectedCard?.cardId === "teleport"}
Escaping by teleport — click a square within four spaces.
{:else if view.stack.defenderId === view.you}
{view.stack.attackerId} attacks with
{attackingCreature ? `the ${cardDef(attackingCreature.kind).name}` : view.stack.attackCard ? cardDef(view.stack.attackCard.cardId).name : "a punch"} —
tap a counteraction card, or
{:else}
{view.stack.waitingOn === view.you ? "They counter your spell — counter back, or" : ""}
{/if}
{/if}
{#if youMustDiscard}
Hand over the limit — mark cards and discard.
{:else if discardMode && discardSelection.size === 0}
Mark the cards to throw away, then confirm.
{/if}
{#if discardSelection.size > 0}
{/if}
{#if discardMode || (discardSelection.size > 0 && !youMustDiscard)}
{/if}
{#if selectedDef}
{selectedDef.name}
{#if edgeSelectMode}— click a wall line{/if}
{#if selectedCard && WAND_IDS.has(selectedCard.cardId) && view.wandCharges[selectedCard.instanceId] == null && !attachedNumber}
— first use: tap a NUMBER card to set the wand's charges, then click a target
{:else if selectedDef.cardType === "attack" && !cellSelectMode && !EDGE_CARDS.has(selectedCard?.cardId ?? "")}
— click a target, or a wall line to batter it{attachedNumber ? ` (powered by a ${numberTotal})` : ""}
{/if}
{#if attachedMods.length > 0}
[+ {attachedMods.map((m) => cardDef(m.cardId).name).join(", ")}]
{/if}
{#if selectedCard?.cardId === "boobytrap"}
— place 4 tokens ({trapCells.length}/4; the first is real)
{/if}
{#if selectedCard?.cardId === "redirection"}
{tradeFrom ? "— now the exit it should connect TO" : "— click the first exit"}
{:else if selectedCard && TWO_CELL_CARDS.has(selectedCard.cardId)}
{tradeFrom ? "— now the second square" : "— click the first square"}
{/if}
{#if selectedCard?.cardId === "rotate-sector"}
— click the sector
{/if}
{#if selectedCard?.cardId === "relocate-sector"}
{pendingSectorFrom ? "— now the destination area" : "— click the sector to move"}
{/if}
{#if selectedCard && NAMED_CARDS.has(selectedCard.cardId)}
{#if selectedCard.cardId === "deja-vu"}
{:else}
— then click the target
{/if}
{/if}
{#if selectedCard?.cardId === "waterbolt"}
(knockback {numberTotal - wbDamage})
{/if}
{#if selectedCard?.cardId === "power-run"}
{/if}
{#if selectedCard && CONFIRM_CAST.has(selectedCard.cardId)}
{/if}
{#if selectedCard && isMovableObject(selectedCard.cardId) && isYourTurn}
{/if}
{#if selectedCard && isNumberCard(selectedCard.cardId)}
{/if}
{/if}