# Drawstep engine · Effects · `discard` > Discard — e.g. “you choose a card from it. You discard that card”. Engine: Magic: The Gathering (`mtg`). This is one primitive of the Drawstep card vocabulary; field names and the discriminator are exact. Wiki page: https://drawstep.xyz/wiki/mtg/effects#discard ## Where it goes One step of an ability's `effects[]` (a spell's, a trigger's, an activated ability's, a mode's): `{ "effect": "discard", … }`. Steps resolve in order. Printed words that point here (search aliases): discard discards hand a card each player. ## Fields | Field | Type | Required | Description | |---|---|---|---| | `who` | `"you" \| "controller" \| "abilityController" \| "sourceController" \| "owner" \| "eachOpponent" \| "eachPlayer" \| "target" \| "triggeringPlayer" \| "defendingPlayer" \| "attackingPlayer" \| "activePlayer" \| "re …` | no | Which player(s) — a player selector (default `you`) | | `also` | `"you" \| "controller" \| "abilityController" \| "sourceController" \| "owner" \| "eachOpponent" \| "eachPlayer" \| "target" \| "triggeringPlayer" \| "defendingPlayer" \| "attackingPlayer" \| "activePlayer" \| "re …` | no | CR 701.9, 608.2c: an additional player in the same discard instruction ("you and those players each … discard a card at random"); deduplicated and performed in APNAP order | | `target` | `TargetDef` | no | What it acts on (TargetDef) | | `cards` | `TargetDef` | no | Specific cards to discard ("that player discards that card", "discard those cards"): each is discarded by its owner from their hand, with no further choice (CR 701.8a). With cards, who / amount / filter are not used | | `amount` | `ValueDef` | no | How many / how much (integer or ValueDef) | | `anyNumber` | `boolean` | no | CR 701.8, 608.2d: choose zero or more cards to discard on resolution, up to amount if present | | `drawDiscarded` | `boolean` | no | After all discard choices and discards, each player draws that many cards | | `drawDiscardedOffset` | `number` | no | With drawDiscarded: each player draws that many plus this signed number ("draws that many cards minus one" = -1), never below zero | | `wholeHand` | `boolean` | no | Discard the whole hand | | `keep` | `ValueDef` | no | With wholeHand: the discarding player chooses this many cards to keep; the rest of the hand is discarded ("chooses a card in their hand and discards the rest", CR 701.9a, 608.2d) | | `random` | `boolean` | no | Discard at random | | `chosenBy` | `"you"` | no | The source's controller chooses the card(s) from the player's hand ("you choose a nonland card from it") | | `filter` | `ObjectFilter` | no | With chosenBy: the cards that may be chosen | ## Minimal form ```json {"effect":"discard","chosenBy":"you"} ``` The engine reads that minimal form as: “you choose a card from it. You discard that card”. ## Stock examples - **Least Discard Study** — “” ```json {"effect":"discard","who":"eachPlayer","wholeHand":true} ``` - **Iteration 71 discard** — “” ```json {"effect":"discard","amount":1} ``` - **Fresh Hand** — “” ```json {"effect":"discard","who":"you","drawDiscarded":true,"wholeHand":true} ``` ## Related - [Effects](https://drawstep.xyz/wiki/mtg/effects.md) — the whole topic - [Filters & targets](https://drawstep.xyz/wiki/mtg/targets.md) — how `target` / `filter` select objects and players (selection algebra) - [Values](https://drawstep.xyz/wiki/mtg/values.md) — every number kind an `amount` accepts - [Start here](https://drawstep.xyz/wiki/mtg/start.md) — the rules, the output contract and the index of every primitive