chooseBoardTargets
Sent when a spell or ability needs targets chosen from the board — players, permanents, or spells on the stack. For example, picking the creature or player Lightning Bolt will deal 3 damage to.
Arguments
Section titled “Arguments”input.type is "chooseBoardTargets". The remaining fields:
interface ChooseBoardTargetsInput { candidates: Array<TargetRef>; hostile: boolean; intent: TargetingIntent; minTargets: number; maxTargets: number; chosenTargets: number; label: string;}#[serde(rename_all = "camelCase")]pub struct ChooseBoardTargetsInput { pub candidates: Vec<TargetRef>, #[serde(default)] pub hostile: bool, pub intent: TargetingIntent, pub min_targets: i32, pub max_targets: i32, pub chosen_targets: i32, pub label: String,}
References: TargetRef , TargetingIntent
Each candidates entry is a TargetRef:
| Field | Type | Description |
|---|---|---|
kind | "player" | "card" | "spell" | What kind of object the target is. |
id | string | Id of the player/card/spell. |
Response
Section titled “Response”type ChooseBoardTargetsOutput = { type: "boardTargets"; chosen: TargetRef[] };Return the chosen TargetRefs — between minTargets and maxTargets of them,
drawn from candidates.
Example
Section titled “Example”{ "promptId": 5, "decidingPlayerId": "player-0", "sourceCardId": "hand-2", "input": { "type": "chooseBoardTargets", "candidates": [ { "kind": "player", "id": "player-1" }, { "kind": "card", "id": "bf-7" } ], "hostile": true, "intent": "damage", "minTargets": 1, "maxTargets": 1, "chosenTargets": 0, "label": "Damage" }}{ "promptId": 5, "output": { "type": "boardTargets", "chosen": [{ "kind": "card", "id": "bf-7" }] }}