chooseBlockers
Sent during the declare-blockers step of combat. The engine tells the client which attackers may be blocked, which of the defender’s creatures can block, and any constraints — for example, an attacker with menace that must be blocked by two or more creatures, or a creature that must be blocked if able.
Arguments
Section titled “Arguments”input.type is "chooseBlockers". The remaining fields:
interface ChooseBlockersInput { attackers: Array<BlockableAttackerDto>; availableBlockerIds: Array<string>; error?: string;}#[serde(rename_all = "camelCase")]pub struct ChooseBlockersInput { pub attackers: Vec<BlockableAttackerDto>, pub available_blocker_ids: Vec<String>, #[serde(default, skip_serializing_if = "Option::is_none")] pub error: Option<String>,}
References: BlockableAttackerDto
Response
Section titled “Response”type ChooseBlockersOutput = { type: "declareBlockers"; assignments: BlockAssignment[] };type BlockAssignment = { blockerId: string; attackerId: string };Return one BlockAssignment for each blocking creature, naming the attacker it
blocks. A single blocker may block one attacker; to gang-block, return multiple
assignments that share the same attackerId. Creatures left back are omitted.
Example
Section titled “Example”{ "promptId": 9, "decidingPlayerId": "player-1", "input": { "type": "chooseBlockers", "attackers": [ { "attackerId": "bf-3", "validBlockerIds": ["bf-7", "bf-8"], "minBlockers": 1, "mustBeBlocked": false }, { "attackerId": "bf-4", "validBlockerIds": ["bf-7", "bf-8"], "minBlockers": 2, "mustBeBlocked": false } ], "availableBlockerIds": ["bf-7", "bf-8"] }}{ "promptId": 9, "output": { "type": "declareBlockers", "assignments": [{ "blockerId": "bf-7", "attackerId": "bf-3" }] }}