Skip to content

chooseAttackers

Sent during the declare-attackers step of combat. The engine tells the client which creatures are able to attack and which players, planeswalkers, or battles each one may attack — for example, choosing to swing with a Grizzly Bears at the opponent’s face while leaving an untapped blocker back.

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

interface ChooseAttackersInput {
attackers: Array<AttackerOptionDto>;
attackTargets: Array<AttackTargetDto>;
}

References: AttackTargetDto , AttackerOptionDto

type ChooseAttackersOutput = { type: "declareAttackers"; assignments: AttackAssignment[] };
type AttackAssignment = { attackerId: string; targetId: string };

Return one AttackAssignment per attacking creature: each assignment sends one creature at one target. Creatures the player chooses not to attack with are simply omitted.

{
"promptId": 7,
"decidingPlayerId": "player-0",
"input": {
"type": "chooseAttackers",
"attackers": [
{ "attackerId": "bf-3", "validTargetIds": ["player-1", "pw-1"] },
{ "attackerId": "bf-4", "validTargetIds": ["player-1", "pw-1"] }
],
"attackTargets": [
{ "id": "player-1", "label": "Opponent", "kind": "player" },
{ "id": "pw-1", "label": "Jace, the Mind Sculptor", "kind": "planeswalker" }
]
}
}
{
"promptId": 7,
"output": {
"type": "declareAttackers",
"assignments": [
{ "attackerId": "bf-3", "targetId": "player-1" },
{ "attackerId": "bf-4", "targetId": "pw-1" }
]
}
}