Skip to content

chooseCards

Sent when the player must pick cards from a presented set — discard to hand size, choose cards to sacrifice, pick targets from a revealed pile, and similar. The engine sends the candidate cards inline so the client can render them without consulting game state.

input.type is "chooseCards". The remaining fields:

interface ChooseCardsInput {
presentation: PromptPresentation;
cards: Array<CardDto>;
min: number;
max: number;
}

References: CardDto , PromptPresentation

The layout adapts to how many cards are sent; both forms return the same chooseCardsDecision. The footer counter shows selected / max, with a confirm once between min and max are picked.

A few cards laid out in a single row

A small set lays the cards out in a single row — quick to scan and tap.

Many cards wrapped into a scrollable grid

A larger set wraps into a scrollable grid, and gains a name filter once the list is long enough to need it.

type ChooseCardsOutput = { type: "chooseCardsDecision"; chosenCardIds: string[] };

Return the ids of the chosen cards — between min and max of them.

{
"promptId": 12,
"decidingPlayerId": "player-0",
"input": {
"type": "chooseCards",
"presentation": { "title": "Discard two cards", "targets": [] },
"cards": [
{ "id": "hand-0", "name": "Lightning Bolt", "manaCost": "{R}", "types": ["Instant"] },
{
"id": "hand-1",
"name": "Llanowar Elves",
"manaCost": "{G}",
"types": ["Creature"],
"power": "1",
"toughness": "1"
}
],
"min": 2,
"max": 2
}
}
{
"promptId": 12,
"output": { "type": "chooseCardsDecision", "chosenCardIds": ["hand-0", "hand-1"] }
}