Between Scenes (Scene #{state.game.current_scene_number} Concluded)

Upkeep and tallying. Nominate a crewmate to Rank Up, redraw hand cards for resting Deep players, and ready up for the next scene.

{#if state.player.is_dead && !state.player.is_ghost && !state.player.needs_reroll}

💀 Your Pi-Rat Has Died!

Your story arc is complete! You went out in a blaze of glory (or retired honorably). You must now choose how your journey continues:

Ghosts look back into the living world, watch over friends, and help their crew. New recruits start fresh at Rank 1 — after upkeep, the whole crew will help create them.

{:else} {#if state.player.needs_reroll}

🐀 A fresh recruit is on the way! Once upkeep wraps up, you and the crew will create your new Pi-Rat together.

{/if}

1. Pirate Ranking (Voting)

Every player (including the Deep) nominates one crewmate who best exemplified pirate qualities in the previous scene. Previous Deep players are ineligible to receive votes.

{#if state.game.phase === 'deep_upkeep'}
{#if rankUpWinner}

🏆 {displayName(rankUpWinner)} won the vote and ranked up to Rank {rankUpWinner.rank}!

{:else}

✔️ Voting complete! No one ranked up this time.

{/if}
{:else if hasVoted}

✔️ Vote submitted! Waiting for other players to submit their nominations.

{:else if !mustVote}

No living crewmates left to nominate — you skip voting this round. Go ahead and ready up.

{:else}
{/if} {#if state.game.phase !== 'deep_upkeep'}

Nomination Progress:

{#each state.players as p} {@const voted = state.votes.some(v => v.voter_player_id === p.id)} {@const skips = eligibleNomineesFor(p).length === 0}
{displayName(p)} {voted ? 'Done' : skips ? 'No vote' : 'Voting...'}
{/each}
{/if}

2. Resting Deep Upkeep

{#if state.player.role === "deep"}

You controlled the Deep in the last scene and your Pi-Rat was resting. You will discard your current hand and redraw back up to your maximum hand size.

{#if state.game.phase === 'between_scenes'}

Voting is currently in progress. Hand refresh will begin after voting concludes.

{:else if state.game.phase === 'deep_upkeep' && state.player.is_ready}

✔️ Hand refreshed! You're holding {hand.length} card{hand.length === 1 ? '' : 's'} for the next scene.

{#each hand as card} {:else}

No cards in hand.

{/each}

Waiting for the rest of the crew to finish upkeep...

{:else if state.game.phase === 'deep_upkeep'}

Your Hand Size Limit: {maxHandSize} cards.
Drag cards to the "Discard Pile" zone to discard them, or click them to move them.

Hand (Keep)

{#each keepCards as card} handleDragStart(e, card)} on:click={() => moveToDiscard(card)} /> {:else}

No cards in hand.

{/each}

Discard Pile

{#each discardCards as card} handleDragStart(e, card)} on:click={() => moveToKeep(card)} /> {:else}

Drag cards here to discard them.

{/each}
{#if isOverLimit}

⚠️ Discard Required: You have selected {keepCards.length} cards to keep, which exceeds your maximum hand limit of {maxHandSize}. Please discard at least {keepCards.length - maxHandSize} card(s).

{/if} {/if}
{:else} {#if state.game.phase === 'between_scenes'}

Your Pi-Rat was active. Your hand cards carry over to the next scene.

{:else if state.game.phase === 'deep_upkeep'}

Waiting for resting Deep player to refresh their hand...

{/if} {/if}

Crew Rank Ledger:

    {#each state.players as p}
  • {displayName(p)}: Rank {p.rank} {#if p.role === 'deep'}Deep{:else if p.is_ghost}Ghost{:else}Pi-Rat{/if}
  • {/each}
{#if state.game.phase === 'deep_upkeep'} {#if state.player.role === 'deep' && !state.player.is_ready}

⚠️ Please complete your Hand Refresh above to proceed to the next scene.

{:else}

Waiting for resting Deep player to refresh their hand...

{/if} {:else} {#if mustVote && !hasVoted}

⚠️ You must nominate a crewmate above before you can ready up.

{:else} {#if state.player.is_ready}

Ready! Waiting for other players to ready up...

{:else} {/if} {/if} {/if} {#if state.player.is_admin && state.game.phase === 'between_scenes'}

All good stories end. When the crew agrees the legend is complete:

{/if}
{/if}