{#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}
{#each [0, 1, 2, 3, 4, 5] as c (c)}
{@const takenBy = Object.entries(net.roomColors).find(([, v]) => v === c)?.[0]}
{/each}
{#if net.you === net.hostId}
{:else}
Waiting for {net.hostId} to flip the boards…
{/if}
{:else if view}
peekAt(c)}
{litCells}
/>
{#if ambushVia}
{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}