# Drawstep AI pack (Magic) — part 4 of 15: Effects (1 of 3) > Every one-shot effect with all its fields. Pack index: https://drawstep.xyz/wiki/mtg/pack.md · previous: https://drawstep.xyz/wiki/mtg/pack/targets.md · next: https://drawstep.xyz/wiki/mtg/pack/effects-2.md · everything in one document: https://drawstep.xyz/wiki/drawstep-mtg-ai-pack.md. Generated from Drawstep's card schema; field names and discriminators are exact. ## Effects (`EffectDef`, discriminator `effect`) One-shot effects, resolved in order. Common optional fields: `target` (TargetDef), `who` (player selector), `amount` (ValueDef), `duration`, `if` / `optional` / `mayPay` / `unlessPays` wrappers. - `native` — A one-shot step carried out by the engine. Engine-implemented node: `id` names an implementation the game module registers; cards contain no code, and an id the running engine doesn't know rejects the card. `text` is the printed clause shown wherever the card is described. Fields: `id`: string — Registry id of an implementation this engine ships ("magic.keepOnePerTypeSacrificeRest"); the native page of each kind lists every id that exists. Never invent one; `params?`: object — Parameters the registered implementation validates and reads; each registered id documents its own; `text`: string — The printed clause this step stands for. - `tableRuling` — One step the table resolves by hand inside an otherwise automated ability (CR 100.7). The engine runs the trigger, costs, targets and the other effects, pauses here with the text, and records the table's outcome; in strict enforced play the step is inert and the card flagged. Prefer this over `unparsed` when the timing of the clause is clear and the card should stay playable. Fields: `text`: string — The printed instruction the table carries out by hand, verbatim; `ruling?`: "ante" | "subgame" | "physical" | "artReference" | "outsideGame" | "flavorReference" | "formatReference" | "other" — Why software cannot resolve it; defaults to other (a custom mechanic the vocabulary lacks); `prompts?`: string[] — Extra questions whose answers the table records ("Which Aura did you attach?"). - `drawCards` — e.g. “draw a card”. Fields: `who?`: "you" | "controller" | "abilityController" | "sourceController" | "owner" | "eachOpponent" | "eachPlayer" | "target" | "triggeringPlayer" | "defendingPlayer" | "attackingPlayer" | "activePlayer" | "replacedPlayer" | "damageSourceController" | "causeController" | "affectedController" | "affectedOwner" | "triggeringController" | "triggeringOwner" | "triggeringOtherController" | "triggeringOtherOwner" | "current" | "previousPlayer" | "mostLife" | "leastLife" | "mostCardsInHand" | "fewestCardsInHand" | "enchantedPlayer" | "yourTeam" | "chosenPlayer" | "playerToYourLeft" | "playerToYourRight" | "attackedPlayers" | "attackingOpponents" | "attackedBySourceThisTurn" | "attackedBySourceLastCombat" | object — Which player(s) — a player selector (default `you`); `also?`: "you" | "controller" | "abilityController" | "sourceController" | "owner" | "eachOpponent" | "eachPlayer" | "target" | "triggeringPlayer" | "defendingPlayer" | "attackingPlayer" | "activePlayer" | "replacedPlayer" | "damageSourceController" | "causeController" | "affectedController" | "affectedOwner" | "triggeringController" | "triggeringOwner" | "triggeringOtherController" | "triggeringOtherOwner" | "current" | "previousPlayer" | "mostLife" | "leastLife" | "mostCardsInHand" | "fewestCardsInHand" | "enchantedPlayer" | "yourTeam" | "chosenPlayer" | "playerToYourLeft" | "playerToYourRight" | "attackedPlayers" | "attackingOpponents" | "attackedBySourceThisTurn" | "attackedBySourceLastCombat" | object — CR 121.2c: an additional player in the same draw instruction; deduplicated and performed in APNAP order; `target?`: TargetDef — What it acts on (TargetDef); `amount`: ValueDef — How many / how much (integer or ValueDef); `upTo?`: boolean — CR 107.1c: "draws up to N cards" — amount is the most each drawing player may draw; each chooses zero through it on resolution; `reveal?`: boolean — "Draw a card and reveal it" (CR 701.20a): the drawn cards are revealed and become the latest selection for the following clauses ("that card's mana value", "if it's a land card, discard it"). - `discard` — e.g. “you choose a card from it. You discard that card”. Fields: `who?`: "you" | "controller" | "abilityController" | "sourceController" | "owner" | "eachOpponent" | "eachPlayer" | "target" | "triggeringPlayer" | "defendingPlayer" | "attackingPlayer" | "activePlayer" | "replacedPlayer" | "damageSourceController" | "causeController" | "affectedController" | "affectedOwner" | "triggeringController" | "triggeringOwner" | "triggeringOtherController" | "triggeringOtherOwner" | "current" | "previousPlayer" | "mostLife" | "leastLife" | "mostCardsInHand" | "fewestCardsInHand" | "enchantedPlayer" | "yourTeam" | "chosenPlayer" | "playerToYourLeft" | "playerToYourRight" | "attackedPlayers" | "attackingOpponents" | "attackedBySourceThisTurn" | "attackedBySourceLastCombat" | object — Which player(s) — a player selector (default `you`); `also?`: "you" | "controller" | "abilityController" | "sourceController" | "owner" | "eachOpponent" | "eachPlayer" | "target" | "triggeringPlayer" | "defendingPlayer" | "attackingPlayer" | "activePlayer" | "replacedPlayer" | "damageSourceController" | "causeController" | "affectedController" | "affectedOwner" | "triggeringController" | "triggeringOwner" | "triggeringOtherController" | "triggeringOtherOwner" | "current" | "previousPlayer" | "mostLife" | "leastLife" | "mostCardsInHand" | "fewestCardsInHand" | "enchantedPlayer" | "yourTeam" | "chosenPlayer" | "playerToYourLeft" | "playerToYourRight" | "attackedPlayers" | "attackingOpponents" | "attackedBySourceThisTurn" | "attackedBySourceLastCombat" | object — 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 — What it acts on (TargetDef); `cards?`: TargetDef — 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 — How many / how much (integer or ValueDef); `anyNumber?`: boolean — CR 701.8, 608.2d: choose zero or more cards to discard on resolution, up to amount if present; `drawDiscarded?`: boolean — After all discard choices and discards, each player draws that many cards; `drawDiscardedOffset?`: number — With drawDiscarded: each player draws that many plus this signed number ("draws that many cards minus one" = -1), never below zero; `wholeHand?`: boolean — Discard the whole hand; `keep?`: ValueDef — 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 — Discard at random; `chosenBy?`: "you" — The source's controller chooses the card(s) from the player's hand ("you choose a nonland card from it"); `filter?`: ObjectFilter — With chosenBy: the cards that may be chosen. - `mill` — e.g. “mill a card”. Fields: `who?`: "you" | "controller" | "abilityController" | "sourceController" | "owner" | "eachOpponent" | "eachPlayer" | "target" | "triggeringPlayer" | "defendingPlayer" | "attackingPlayer" | "activePlayer" | "replacedPlayer" | "damageSourceController" | "causeController" | "affectedController" | "affectedOwner" | "triggeringController" | "triggeringOwner" | "triggeringOtherController" | "triggeringOtherOwner" | "current" | "previousPlayer" | "mostLife" | "leastLife" | "mostCardsInHand" | "fewestCardsInHand" | "enchantedPlayer" | "yourTeam" | "chosenPlayer" | "playerToYourLeft" | "playerToYourRight" | "attackedPlayers" | "attackingOpponents" | "attackedBySourceThisTurn" | "attackedBySourceLastCombat" | object — Which player(s) — a player selector (default `you`); `target?`: TargetDef — What it acts on (TargetDef); `amount`: ValueDef — How many / how much (integer or ValueDef). - `scry` — e.g. “scry 1”. Fields: `who?`: "you" | "controller" | "abilityController" | "sourceController" | "owner" | "eachOpponent" | "eachPlayer" | "target" | "triggeringPlayer" | "defendingPlayer" | "attackingPlayer" | "activePlayer" | "replacedPlayer" | "damageSourceController" | "causeController" | "affectedController" | "affectedOwner" | "triggeringController" | "triggeringOwner" | "triggeringOtherController" | "triggeringOtherOwner" | "current" | "previousPlayer" | "mostLife" | "leastLife" | "mostCardsInHand" | "fewestCardsInHand" | "enchantedPlayer" | "yourTeam" | "chosenPlayer" | "playerToYourLeft" | "playerToYourRight" | "attackedPlayers" | "attackingOpponents" | "attackedBySourceThisTurn" | "attackedBySourceLastCombat" | object — Which player(s) — a player selector (default `you`); `target?`: TargetDef — "Target player scries N" (CR 601.2c, 701.22a): the scrying player is a target chosen as the spell is cast; `who: "target"` alone targets a player too; `amount`: ValueDef — How many / how much (integer or ValueDef). - `surveil` — e.g. “surveil 1”. Fields: `who?`: "you" | "controller" | "abilityController" | "sourceController" | "owner" | "eachOpponent" | "eachPlayer" | "target" | "triggeringPlayer" | "defendingPlayer" | "attackingPlayer" | "activePlayer" | "replacedPlayer" | "damageSourceController" | "causeController" | "affectedController" | "affectedOwner" | "triggeringController" | "triggeringOwner" | "triggeringOtherController" | "triggeringOtherOwner" | "current" | "previousPlayer" | "mostLife" | "leastLife" | "mostCardsInHand" | "fewestCardsInHand" | "enchantedPlayer" | "yourTeam" | "chosenPlayer" | "playerToYourLeft" | "playerToYourRight" | "attackedPlayers" | "attackingOpponents" | "attackedBySourceThisTurn" | "attackedBySourceLastCombat" | object — Which player(s) — a player selector (default `you`); `target?`: TargetDef — "Target player surveils N" (CR 601.2c, 701.25a): the surveilling player is a target chosen as the spell is cast; `who: "target"` alone targets a player too; `amount`: ValueDef — How many / how much (integer or ValueDef). - `dealDamage` — e.g. “~ deals 1 damage to target permanent chosen at random that share a creature type”. Fields: `whenCreatureDies?`: EffectDef[] — Trigger these effects once if a creature dies from this damage at the immediately following state-based action check; `target`: { of: "object" | "player" | "spell" | "ability" | "spellOrAbility" | "any"; slot?: string; mode?: "chosen" | "choose" | "all" | "self" | "random" | "host" | "triggering" | "created" | "convoked" | "linked" | "paired" | "top" | "affected" | "replaced" | "replacedSource" | "triggeringOther" | "about" | "thisWay" | "costPaid" | "attacked" | "grantor"; action?: "sacrificed" | "milled" | "destroyed" | "exiled" | "discarded" | "returned" | "putIntoLibrary" | "tapped" | "untapped" | "damaged" | "drawn" | "revealed" | "countersPlaced" | "countersRemoved" | "amassed" | "countered" | "phasedOut" | "searched" | "created"; among?: "triggering"; chooser?: any; random?: true; zone?: "battlefield" | "hand" | "graveyard" | "library" | "exile" | "stack" | "command"; allZones?: boolean; position?: "top" | "bottom"; filter?: ObjectFilter; player?: any; playerOwns?: true; exceptPlayer?: any; playerFilter?: "opponent"; sameZoneOwner?: boolean; maxTotalManaValue?: ValueDef; maxTotalPower?: ValueDef; distinctBy?: "name" | "manaValue" | "controller" | "power"; equalBy?: "toughness" | "power" | "manaValue"; sharesType?: "card" | "permanent"; sharedBy?: "creatureType"; zones?: ("battlefield" | "hand" | "graveyard" | "library" | "exile" | "stack" | "command")[]; playerTarget?: PlayerTargetDef; digSubset?: "looked" | "picked" | "rest"; span?: number; targetCount?: number; targetsOnlySource?: boolean; permanents?: true; stackTargets?: object; spell?: object; ability?: object; min?: ValueDef; max?: ValueDef | "any"; differentFromEarlierTargets?: boolean; attacker?: "self" | "triggering"; label?: string } — Who or what is dealt the damage. Whatever the mode, only creatures, planeswalkers, battles and players are ever selected (CR 120.3): the filter need not say so; `amount`: ValueDef — How many / how much (integer or ValueDef); `from?`: TargetDef — The object that deals the damage instead of the source ("target creature you control deals damage equal to its power to …"); values such as sourcePower are read from it; `divided?`: boolean — "… damage divided as you choose among one, two, or three targets / any number of targets": the division is announced as the spell is cast (each target at least 1, CR 601.2d); an illegal target on resolution loses its share; `dividedEvenly?`: boolean — CR 608.2b, 608.2h: divide damage evenly, rounded down, among targets still legal on resolution; no casting-time allocation; `excessTo?`: "controller" | { controllerIfSourceHas: string } — "Excess damage is dealt to that creature's controller instead" (CR 120.4a): each selected permanent is dealt only lethal damage (toughness less damage marked, 1 from a deathtouch source, loyalty, defense) and its controller is dealt the rest at the same time; `and?`: ({ target: TargetDef; amount: ValueDef })[] — Further recipients of the same instruction (CR 120.2b, 608.2c, 603.2c): "deals 4 damage to any target and 3 damage to each of up to two other targets", "to each creature without flying and each player". The same source (`from` included) deals all of it as one simultaneous damage event: every group is selected before any damage is dealt, a recipient named twice is dealt the sum once, lifelink gains once (CR 120.3f) and each prevention effect applies once per recipient (CR 615.13). - `setLife` — CR 119.5: gain/lose the difference to set a life total, with replacements and triggers. Fields: `who?`: "you" | "controller" | "abilityController" | "sourceController" | "owner" | "eachOpponent" | "eachPlayer" | "target" | "triggeringPlayer" | "defendingPlayer" | "attackingPlayer" | "activePlayer" | "replacedPlayer" | "damageSourceController" | "causeController" | "affectedController" | "affectedOwner" | "triggeringController" | "triggeringOwner" | "triggeringOtherController" | "triggeringOtherOwner" | "current" | "previousPlayer" | "mostLife" | "leastLife" | "mostCardsInHand" | "fewestCardsInHand" | "enchantedPlayer" | "yourTeam" | "chosenPlayer" | "playerToYourLeft" | "playerToYourRight" | "attackedPlayers" | "attackingOpponents" | "attackedBySourceThisTurn" | "attackedBySourceLastCombat" | object — Which player(s) — a player selector (default `you`); `target?`: TargetDef — What it acts on (TargetDef); `amount`: ValueDef — How many / how much (integer or ValueDef). - `redistributeLife` — "Redistribute any number of life totals" (CR 119.5, 608.2d): choose any number of players (one per team sharing a life total, CR 810.9), then give each of them one of their life totals back; each one's life becomes that number. No fields. - `exchangeLife` — CR 701.12: exchange life totals, all or nothing if a required gain/loss is prohibited. Fields: `who?`: "you" | "controller" | "abilityController" | "sourceController" | "owner" | "eachOpponent" | "eachPlayer" | "target" | "triggeringPlayer" | "defendingPlayer" | "attackingPlayer" | "activePlayer" | "replacedPlayer" | "damageSourceController" | "causeController" | "affectedController" | "affectedOwner" | "triggeringController" | "triggeringOwner" | "triggeringOtherController" | "triggeringOtherOwner" | "current" | "previousPlayer" | "mostLife" | "leastLife" | "mostCardsInHand" | "fewestCardsInHand" | "enchantedPlayer" | "yourTeam" | "chosenPlayer" | "playerToYourLeft" | "playerToYourRight" | "attackedPlayers" | "attackingOpponents" | "attackedBySourceThisTurn" | "attackedBySourceLastCombat" | object — Which player(s) — a player selector (default `you`); `target`: PlayerTargetDef — What it acts on (TargetDef). - `exchangeLifeWithStat` — CR 701.12g, 613.4b: "exchange your life total with this creature's toughness" - the player's life becomes the object's previous power/toughness (gain or loss) and a layer-7b effect with no duration sets the stat to the previous life total; all or nothing (CR 701.12a): nothing happens if the object has left the battlefield or the life change is prohibited. Fields: `who?`: "you" | "controller" | "abilityController" | "sourceController" | "owner" | "eachOpponent" | "eachPlayer" | "target" | "triggeringPlayer" | "defendingPlayer" | "attackingPlayer" | "activePlayer" | "replacedPlayer" | "damageSourceController" | "causeController" | "affectedController" | "affectedOwner" | "triggeringController" | "triggeringOwner" | "triggeringOtherController" | "triggeringOtherOwner" | "current" | "previousPlayer" | "mostLife" | "leastLife" | "mostCardsInHand" | "fewestCardsInHand" | "enchantedPlayer" | "yourTeam" | "chosenPlayer" | "playerToYourLeft" | "playerToYourRight" | "attackedPlayers" | "attackingOpponents" | "attackedBySourceThisTurn" | "attackedBySourceLastCombat" | object — Whose life total is exchanged; default you. "target opponent's life total" is "target" with a player target; `target?`: PlayerTargetDef — What it acts on (TargetDef); `object`: { of: "object" | "player" | "spell" | "ability" | "spellOrAbility" | "any"; slot?: string; mode?: "chosen" | "choose" | "all" | "self" | "random" | "host" | "triggering" | "created" | "convoked" | "linked" | "paired" | "top" | "affected" | "replaced" | "replacedSource" | "triggeringOther" | "about" | "thisWay" | "costPaid" | "attacked" | "grantor"; action?: "sacrificed" | "milled" | "destroyed" | "exiled" | "discarded" | "returned" | "putIntoLibrary" | "tapped" | "untapped" | "damaged" | "drawn" | "revealed" | "countersPlaced" | "countersRemoved" | "amassed" | "countered" | "phasedOut" | "searched" | "created"; among?: "triggering"; chooser?: any; random?: true; zone?: "battlefield" | "hand" | "graveyard" | "library" | "exile" | "stack" | "command"; allZones?: boolean; position?: "top" | "bottom"; filter?: ObjectFilter; player?: any; playerOwns?: true; exceptPlayer?: any; playerFilter?: "opponent"; sameZoneOwner?: boolean; maxTotalManaValue?: ValueDef; maxTotalPower?: ValueDef; distinctBy?: "name" | "manaValue" | "controller" | "power"; equalBy?: "toughness" | "power" | "manaValue"; sharesType?: "card" | "permanent"; sharedBy?: "creatureType"; zones?: ("battlefield" | "hand" | "graveyard" | "library" | "exile" | "stack" | "command")[]; playerTarget?: PlayerTargetDef; digSubset?: "looked" | "picked" | "rest"; span?: number; targetCount?: number; targetsOnlySource?: boolean; permanents?: true; stackTargets?: object; spell?: object; ability?: object; min?: ValueDef; max?: ValueDef | "any"; differentFromEarlierTargets?: boolean; attacker?: "self" | "triggering"; label?: string } — The permanent whose power or toughness is exchanged (usually the source); `stat`: "power" | "toughness" — Which characteristic of the permanent is exchanged with the life total (CR 701.12a, 119.7-8). - `duelReveal` — CR 701.20a, 608.2c: two players each reveal the top card of their library, each loses life equal to the mana value of the card the other revealed (one simultaneous event), then each puts the card they revealed into their hand (Keen Duelist, Parker Luck). Fields: `target`: { of: "player"; slot?: string; mode?: "chosen" | "choose" | "all" | "random" | "triggering" | "about" | "affected"; span?: number; player?: any; exceptPlayer?: any; random?: true; min?: ValueDef; max?: ValueDef | "any"; label?: string } — The target opponent (withYou) or the two target players; `withYou?`: boolean — You and the one target player duel ("you and target opponent each reveal"); otherwise the two target players. - `gainLife` — e.g. “you gain 1 life”. Fields: `who?`: "you" | "controller" | "abilityController" | "sourceController" | "owner" | "eachOpponent" | "eachPlayer" | "target" | "triggeringPlayer" | "defendingPlayer" | "attackingPlayer" | "activePlayer" | "replacedPlayer" | "damageSourceController" | "causeController" | "affectedController" | "affectedOwner" | "triggeringController" | "triggeringOwner" | "triggeringOtherController" | "triggeringOtherOwner" | "current" | "previousPlayer" | "mostLife" | "leastLife" | "mostCardsInHand" | "fewestCardsInHand" | "enchantedPlayer" | "yourTeam" | "chosenPlayer" | "playerToYourLeft" | "playerToYourRight" | "attackedPlayers" | "attackingOpponents" | "attackedBySourceThisTurn" | "attackedBySourceLastCombat" | object — Which player(s) — a player selector (default `you`); `also?`: "you" | "controller" | "abilityController" | "sourceController" | "owner" | "eachOpponent" | "eachPlayer" | "target" | "triggeringPlayer" | "defendingPlayer" | "attackingPlayer" | "activePlayer" | "replacedPlayer" | "damageSourceController" | "causeController" | "affectedController" | "affectedOwner" | "triggeringController" | "triggeringOwner" | "triggeringOtherController" | "triggeringOtherOwner" | "current" | "previousPlayer" | "mostLife" | "leastLife" | "mostCardsInHand" | "fewestCardsInHand" | "enchantedPlayer" | "yourTeam" | "chosenPlayer" | "playerToYourLeft" | "playerToYourRight" | "attackedPlayers" | "attackingOpponents" | "attackedBySourceThisTurn" | "attackedBySourceLastCombat" | object — Each named participant gains the amount; if both refer to the same player, they gain twice the amount as one event; `target?`: TargetDef — What it acts on (TargetDef); `amount`: ValueDef — How many / how much (integer or ValueDef). - `loseLife` — e.g. “you lose 1 life”. Fields: `who?`: "you" | "controller" | "abilityController" | "sourceController" | "owner" | "eachOpponent" | "eachPlayer" | "target" | "triggeringPlayer" | "defendingPlayer" | "attackingPlayer" | "activePlayer" | "replacedPlayer" | "damageSourceController" | "causeController" | "affectedController" | "affectedOwner" | "triggeringController" | "triggeringOwner" | "triggeringOtherController" | "triggeringOtherOwner" | "current" | "previousPlayer" | "mostLife" | "leastLife" | "mostCardsInHand" | "fewestCardsInHand" | "enchantedPlayer" | "yourTeam" | "chosenPlayer" | "playerToYourLeft" | "playerToYourRight" | "attackedPlayers" | "attackingOpponents" | "attackedBySourceThisTurn" | "attackedBySourceLastCombat" | object — Which player(s) — a player selector (default `you`); `target?`: TargetDef — What it acts on (TargetDef); `amount`: ValueDef — How many / how much (integer or ValueDef). - `destroy` — e.g. “destroy target creature”. Fields: `target`: TargetDef — What it acts on (TargetDef); `noRegenerate?`: boolean — "It can't be regenerated."; `andSelf?`: boolean — Destroy the selected objects and the source simultaneously (CR 701.7a, 608.2c); `and?`: ({ target: TargetDef })[] — Further objects of the same instruction (CR 701.8a, 608.2c): "destroy target enchantment and each other enchantment that shares a color with it" — each group selected as its own clause would be, all destroyed at the same time. - `exile` — Exile selected objects; mode choose and chooser target let the targeted player choose their own cards on resolution (CR 406.1, 608.2d). Fields: `target`: TargetDef — What it acts on (TargetDef); `faceDown?`: boolean — Face down (CR 708); `link?`: boolean | "timestampOrder" — Link the exiled cards to this source incarnation. timestampOrder lets the exiling player order simultaneous components so the latest card is defined (CR 712.21b, 727.3); `until?`: { untilEvent: TriggerDef } | { leaves: TargetDef } — CR 610.3: exile only until this event; the cards then return (Palace Jailer, Calix). - `bounce` — Return selected cards to their individual owners' hands, including all cards linked to the source (CR 400.3, 607.2a). Fields: `target`: TargetDef — What it acts on (TargetDef). - `moveTo` — e.g. “put target creature onto the battlefield”. Fields: `target`: TargetDef — What it acts on (TargetDef); `destination`: "battlefield" | "hand" | "graveyard" | "library" | "exile" | "stack" | "command" — Zone the objects are put into; `position?`: "top" | "bottom" | { fromTop: any } | { chooser: "owner" | "you"; options?: any[]; each?: boolean } — Exact placement in a library, including third from the top (CR 401.4, 401.7); { chooser } asks that player for top or bottom on resolution ("its owner puts it on their choice of the top or bottom of their library", CR 608.2d); `order?`: "chosen" | "random" — Order only the moved group within each owner's library, not the whole deck. Omitted: owner chooses (CR 401.4); `tapped?`: boolean — Tapped (true) or untapped (false); on an effect that puts something onto the battlefield, it enters tapped; `andSelf?`: boolean — The source moves together with the selected objects (CR 608.2c): "Return ~ and another target creature to their owners' hands"; `attachedTo?`: TargetDef — Enter attached to this object (CR 303.4f, 701.3), before enters triggers; `attacking?`: boolean | "defendingPlayer" — Enter attacking without attack triggers or implicit tapping; optionally fixed to the defending player (CR 508.4); `controller?`: "you" | "owner" | "opponent" — Who controls it on the battlefield: you (default), its owner, or an opponent you choose as the effect resolves (CR 608.2d); `withCounters?`: { counter: string; amount: ValueDef; filter?: ObjectFilter } | object[] — Each selected permanent enters with these additional counters, before enters triggers (CR 122.6, 614.12); `faceDown?`: boolean | "choose" — CR 708.2, 608.2d: choose face up or face down for each card as it enters; `transformed?`: boolean — Onto the battlefield back face up: a transform card enters transformed (CR 712.14a); a custom modal double-faced card enters as its back face ("return Juiblex from the graveyard to the battlefield" on the back of a modal card). Without it a double-faced card enters front face up; `link?`: boolean — Link the moved cards to the source (CR 607.2a): later abilities of the source refer to them with `mode: "linked"` / filter `linkedToSource`; `as?`: EffectDef[] — Continuous effects applied to each permanent as it enters, before it chooses what to enchant and before enters triggers (CR 303.4f, 611.2a): "It's an Aura enchantment with enchant creature you control and '…' and it loses all other abilities" — the entering permanent is { mode: "affected" }; use permanent durations. - `sacrifice` — The players `who` means (default you) each sacrifice `target` (mode `choose` = of their choice; `random` = `max` of their permanents at random, default one; `all` = every match). The count is per player. `who: "target"` with `player` is "target player / opponent sacrifices …" (the player is a target of the spell). Fields: `target`: TargetDef — What it acts on (TargetDef); `who?`: "you" | "controller" | "abilityController" | "sourceController" | "owner" | "eachOpponent" | "eachPlayer" | "target" | "triggeringPlayer" | "defendingPlayer" | "attackingPlayer" | "activePlayer" | "replacedPlayer" | "damageSourceController" | "causeController" | "affectedController" | "affectedOwner" | "triggeringController" | "triggeringOwner" | "triggeringOtherController" | "triggeringOtherOwner" | "current" | "previousPlayer" | "mostLife" | "leastLife" | "mostCardsInHand" | "fewestCardsInHand" | "enchantedPlayer" | "yourTeam" | "chosenPlayer" | "playerToYourLeft" | "playerToYourRight" | "attackedPlayers" | "attackingOpponents" | "attackedBySourceThisTurn" | "attackedBySourceLastCombat" | object — Which player(s) — a player selector (default `you`); `player?`: PlayerTargetDef — Player selector for whose zone or which player is counted; `also?`: "you" | "controller" | "abilityController" | "sourceController" | "owner" | "eachOpponent" | "eachPlayer" | "target" | "triggeringPlayer" | "defendingPlayer" | "attackingPlayer" | "activePlayer" | "replacedPlayer" | "damageSourceController" | "causeController" | "affectedController" | "affectedOwner" | "triggeringController" | "triggeringOwner" | "triggeringOtherController" | "triggeringOtherOwner" | "current" | "previousPlayer" | "mostLife" | "leastLife" | "mostCardsInHand" | "fewestCardsInHand" | "enchantedPlayer" | "yourTeam" | "chosenPlayer" | "playerToYourLeft" | "playerToYourRight" | "attackedPlayers" | "attackingOpponents" | "attackedBySourceThisTurn" | "attackedBySourceLastCombat" | object — CR 701.21a, 101.4: an additional player in the same sacrifice instruction ("you and that player each sacrifice a creature"); each chooses their own permanent and the sacrifices happen at once. Deduplicated, in APNAP order. - `tap` — e.g. “tap target creature”. Fields: `target`: TargetDef — What it acts on (TargetDef). - `untap` — e.g. “untap target creature”. Fields: `target`: TargetDef — What it acts on (TargetDef). - `removeFromCombat` — CR 506.4: remove the selected creatures from combat — they stop attacking / blocking (a blocked attacker stays blocked), deal and receive no combat damage this combat. Fields: `target`: TargetDef — What it acts on (TargetDef). - `reselectAttack` — "Reselect which player or permanent target attacking creature is attacking" (Misleading Signpost): this effect's controller chooses anew what each selected attacking creature attacks — any player other than its controller, or a planeswalker or battle such a player controls — ignoring attack requirements, restrictions and costs. It stays attacking and still counts as having attacked what it was declared to attack; no attack ability triggers (CR 506.4, 508.1b, 508.4). Fields: `target`: TargetDef — What it acts on (TargetDef). - `endTurn` — CR 716.1: end the turn — exile every object on the stack (including the resolving card), remove all creatures from combat, check state-based actions, then skip straight to the cleanup step; "at the beginning of the end step" abilities do not trigger this turn (CR 716.4). No fields. - `endCombat` — "End the combat phase" (CR 506.1, 716 by analogy; Mandate of Peace rulings): exile every spell and ability on the stack (the resolving card too), check state-based actions, remove all creatures from combat and end "until end of combat" effects, then skip the end of combat step to the next phase. Only during a combat phase. No fields. - `suspendCard` — CR 702.62c: the selected exiled cards gain suspend — with time counters on them they are suspended cards: their owner removes a time counter at each upkeep and casts the card without paying its mana cost when the last is removed ("exile it with three time counters on it and it gains suspend"). Fields: `target`: TargetDef — What it acts on (TargetDef). - `plotCard` — CR 702.170a, 702.170d: the selected exiled cards become plotted ("exile target spell. It becomes plotted"): their owner may cast each one as a sorcery on a later turn without paying its mana cost. Fields: `target`: TargetDef — What it acts on (TargetDef). - `addCounters` — e.g. “put a +1/+1 counter on target creature”. Fields: `sacrificeRest?`: ObjectFilter — CR 101.4, 701.21a, 608.2c: after counter placement, simultaneously sacrifice matching permanents those players control other than the chosen recipients; retain the recipients as affected; `who?`: "you" | "controller" | "abilityController" | "sourceController" | "owner" | "eachOpponent" | "eachPlayer" | "target" | "triggeringPlayer" | "defendingPlayer" | "attackingPlayer" | "activePlayer" | "replacedPlayer" | "damageSourceController" | "causeController" | "affectedController" | "affectedOwner" | "triggeringController" | "triggeringOwner" | "triggeringOtherController" | "triggeringOtherOwner" | "current" | "previousPlayer" | "mostLife" | "leastLife" | "mostCardsInHand" | "fewestCardsInHand" | "enchantedPlayer" | "yourTeam" | "chosenPlayer" | "playerToYourLeft" | "playerToYourRight" | "attackedPlayers" | "attackingOpponents" | "attackedBySourceThisTurn" | "attackedBySourceLastCombat" | object — CR 101.4, 122.1: players placing counters; each chooses before counters are placed simultaneously; current is that player; `optional?`: boolean — Each placing player may decline (CR 608.2d); `then?`: EffectDef[] — After placement, run for each player who chose to act, with current bound to them (CR 118.12); `target`: TargetDef — What it acts on (TargetDef); `counters?`: ({ counter: string; if: ObjectFilter })[] — CR 122.1, 608.2c, 603.2c: put amount of each matching counter kind simultaneously; test all recipient filters before placing any counters; `chosenCounter?`: string — CR 122.1, 608.2d: key of a counter kind chosen earlier in this resolution; an impossible choice adds nothing. Supports permanent and player counters; `onlyIfAbsent?`: boolean — CR 608.2c: add counters only if the recipient has none of the chosen kind; `counter?`: string | string[] — CR 122.1, 608.2d: a kind, or a list for "your choice of a +1/+1, first strike, or trample counter" chosen on resolution for each recipient; `amounts?`: ValueDef[] — CR 122.1, 608.2d: with a counter list, the count for each alternative in order ("your choice of a +1/+1 counter or two charge counters"); the chosen alternative places its own count instead of amount; `amount`: ValueDef — How many / how much (integer or ValueDef); `upTo?`: boolean — CR 107.1b, 608.2d: choose zero through amount on resolution for each recipient; `divided?`: boolean — "Distribute N +1/+1 counters among one, two, or three target creatures": the distribution is announced as the spell is cast (each target at least one, CR 601.2d); `maxTotal?`: ValueDef — "This ability can't cause the total number of +1/+0 counters on this creature to be greater than four": put only as many as keep each recipient's count of this counter at or below this total (CR 122.1). - `tapOrUntap` — CR 608.2d: choose to tap or untap the declared target on resolution. Fields: `target`: TargetDef — What it acts on (TargetDef); `who?`: "you" | "controller" | "abilityController" | "sourceController" | "owner" | "eachOpponent" | "eachPlayer" | "target" | "triggeringPlayer" | "defendingPlayer" | "attackingPlayer" | "activePlayer" | "replacedPlayer" | "damageSourceController" | "causeController" | "affectedController" | "affectedOwner" | "triggeringController" | "triggeringOwner" | "triggeringOtherController" | "triggeringOtherOwner" | "current" | "previousPlayer" | "mostLife" | "leastLife" | "mostCardsInHand" | "fewestCardsInHand" | "enchantedPlayer" | "yourTeam" | "chosenPlayer" | "playerToYourLeft" | "playerToYourRight" | "attackedPlayers" | "attackingOpponents" | "attackedBySourceThisTurn" | "attackedBySourceLastCombat" | object — CR 608.2d: player choosing tap or untap; defaults to the ability controller. - `removeCounters` — e.g. “remove a +1/+1 counter from target creature”. Fields: `target`: TargetDef — What it acts on (TargetDef); `counter?`: string — Counter kind; defaults to +1/+1. any permits a mixture of kinds chosen on resolution (CR 122.1); `amount`: ValueDef | "any" | "all" — Remove this many counters; any chooses zero through the available counters on resolution, all removes every available counter (CR 122.1, 608.2d, 609.3); `upTo?`: boolean — CR 107.1b, 608.2d: choose zero through amount on resolution for each recipient. - `modifyPT` — e.g. “target creature gets +1/+1 until end of turn”. Fields: `target`: TargetDef — What it acts on (TargetDef); `power`: ValueDef — Power (a number, or a string such as "*" for characteristic-defining values); `toughness`: ValueDef — Toughness (a number, or a string such as "*" for characteristic-defining values); `duration?`: "instant" | "endOfTurn" | "endOfCombat" | "endOfAdditionalCombat" | "untilYourNextTurn" | "untilEndOfYourNextTurn" | "untilEndOfNextTurn" | "untilStackEmpty" | "untilYourNextEndStep" | "untilYourNextUpkeep" | "permanent" | "untilSourceLeaves" | "whileYouControlSource" | "whileYourTurn" | "perpetual" | { whileSource: object; whileTarget?: object } | { whileSource?: object; whileTarget: object } | { untilEvent: TriggerDef } — CR 611.2a-b, 702.26f: continuous-effect duration. Conditional source/target filters are ANDed, identities and you are fixed on resolution, and failure ends the effect permanently. untilEndOfYourNextTurn lasts through your next turn's end step and expires at cleanup; whileYourTurn ends when another player becomes active and cannot start on an opponent's turn. untilYourNextEndStep / untilYourNextUpkeep end as that step begins; endOfCombat ends as the end-combat step ends (CR 511.2); endOfAdditionalCombat lasts through the additional combat phase created before it resolved, ending as that combat's end-combat step ends (CR 500.8, 506.1 — "that combat"). untilEvent ends when the described event happens. perpetual survives zone changes; `alternative?`: { power: ValueDef; toughness: ValueDef } — CR 608.2d: choose either printed P/T change on resolution. - `grantKeyword` — e.g. “target creature gains flying until end of turn”. Fields: `target`: TargetDef — What it acts on (TargetDef); `keyword`: string | string[] — A keyword, or a printed list from which the controller chooses one at resolution for all recipients (CR 608.2d); `duration?`: Duration — CR 611.2a-b, 702.26f: continuous-effect duration. Conditional source/target filters are ANDed, identities and you are fixed on resolution, and failure ends the effect permanently. untilEndOfYourNextTurn lasts through your next turn's end step and expires at cleanup; whileYourTurn ends when another player becomes active and cannot start on an opponent's turn. untilYourNextEndStep / untilYourNextUpkeep end as that step begins; endOfCombat ends as the end-combat step ends (CR 511.2); endOfAdditionalCombat lasts through the additional combat phase created before it resolved, ending as that combat's end-combat step ends (CR 500.8, 506.1 — "that combat"). untilEvent ends when the described event happens. perpetual survives zone changes. - `createToken` — e.g. “create a colorless creature token”. Fields: `who?`: "you" | "controller" | "abilityController" | "sourceController" | "owner" | "eachOpponent" | "eachPlayer" | "target" | "triggeringPlayer" | "defendingPlayer" | "attackingPlayer" | "activePlayer" | "replacedPlayer" | "damageSourceController" | "causeController" | "affectedController" | "affectedOwner" | "triggeringController" | "triggeringOwner" | "triggeringOtherController" | "triggeringOtherOwner" | "current" | "previousPlayer" | "mostLife" | "leastLife" | "mostCardsInHand" | "fewestCardsInHand" | "enchantedPlayer" | "yourTeam" | "chosenPlayer" | "playerToYourLeft" | "playerToYourRight" | "attackedPlayers" | "attackingOpponents" | "attackedBySourceThisTurn" | "attackedBySourceLastCombat" | object — Which player(s) — a player selector (default `you`); `also?`: "you" | "controller" | "abilityController" | "sourceController" | "owner" | "eachOpponent" | "eachPlayer" | "target" | "triggeringPlayer" | "defendingPlayer" | "attackingPlayer" | "activePlayer" | "replacedPlayer" | "damageSourceController" | "causeController" | "affectedController" | "affectedOwner" | "triggeringController" | "triggeringOwner" | "triggeringOtherController" | "triggeringOtherOwner" | "current" | "previousPlayer" | "mostLife" | "leastLife" | "mostCardsInHand" | "fewestCardsInHand" | "enchantedPlayer" | "yourTeam" | "chosenPlayer" | "playerToYourLeft" | "playerToYourRight" | "attackedPlayers" | "attackingOpponents" | "attackedBySourceThisTurn" | "attackedBySourceLastCombat" | object — CR 101.4, 111.2, 608.2c: additional creators in the same instruction; each player creates once, in APNAP order (you and that player each create); `target?`: PlayerTargetDef — The targeted player who creates these tokens (CR 601.2c, 111.2); `attachedTo?`: TargetDef — Create attached to this host before enters triggers (CR 303.4f); `token`: object | { oneOf: object[]; chooseAtRandom?: boolean; excludeControlled?: boolean } — The complete inline token spec (TokenSpec: name, types, subtypes, colors, power, toughness, keywords, abilities …); `amount?`: ValueDef — How many / how much (integer or ValueDef); `tapped?`: boolean — Tapped (true) or untapped (false); on an effect that puts something onto the battlefield, it enters tapped; `attacking?`: boolean | "defendingPlayer" | "current" | { player: any; orPlaneswalker: true } — Enter attacking, optionally a fixed player: the defending player or current bound by forEachPlayer (CR 508.4). It does not tap the tokens: "tapped and attacking" also sets tapped; `blocking?`: TargetDef — CR 509.4, 506.3d: enter blocking this attacking creature ("a 0/1 green Plant creature token that's blocking that creature"); for triggers it never "blocked"; `and?`: ({ token: object; amount?: ValueDef })[] — CR 701.7a, 603.2c, 603.6a, 614.12: further token kinds created by the same instruction ("create a 3/3 … Wurm token with deathtouch and a 3/3 … Wurm token with lifelink"): every token is created in one event — token replacement effects apply to the whole event once and all the tokens enter simultaneously, so "one or more tokens enter" triggers once. The other fields apply to every kind. - `createTokenCopy` — e.g. “create a token that's a copy of target creature”. Fields: `target`: TargetDef — What it acts on (TargetDef); `link?`: boolean — CR 400.7, 607.1: link all tokens created by this instruction to the source incarnation, so later instructions can refer to tokens created with it; `amount?`: ValueDef — How many / how much (integer or ValueDef); `tapped?`: boolean — Tapped (true) or untapped (false); on an effect that puts something onto the battlefield, it enters tapped; `attacking?`: boolean — Attacking (true) / not attacking (false); on an effect that creates or moves a creature, it enters attacking; `haste?`: boolean — The created tokens have haste; `except?`: { keywords?: string[]; keywordAbilities?: KeywordAbilityDef[]; abilities?: any[]; addTypes?: string[]; addSubtypes?: string[]; setTypes?: string[]; setSubtypes?: string[]; removeSubtypes?: string[]; colors?: string[]; addColors?: string[]; power?: ValueDef; toughness?: ValueDef; loyalty?: ValueDef; notLegendary?: boolean; legendary?: boolean; name?: string; noManaCost?: boolean } — Except: changes to the copy's copiable values (CR 707.9); `who?`: "you" | "controller" | "abilityController" | "sourceController" | "owner" | "eachOpponent" | "eachPlayer" | "target" | "triggeringPlayer" | "defendingPlayer" | "attackingPlayer" | "activePlayer" | "replacedPlayer" | "damageSourceController" | "causeController" | "affectedController" | "affectedOwner" | "triggeringController" | "triggeringOwner" | "triggeringOtherController" | "triggeringOtherOwner" | "current" | "previousPlayer" | "mostLife" | "leastLife" | "mostCardsInHand" | "fewestCardsInHand" | "enchantedPlayer" | "yourTeam" | "chosenPlayer" | "playerToYourLeft" | "playerToYourRight" | "attackedPlayers" | "attackingOpponents" | "attackedBySourceThisTurn" | "attackedBySourceLastCombat" | object — The player who creates the token (CR 111.2); default: the controller; `withCounters?`: { counter: string; amount: ValueDef } — CR 122.6, 614.1c: "except it enters with an additional +1/+1 counter on it" — counters each token enters with; not a copiable value. - `addMana` — e.g. “add {G}”. Fields: `who?`: "you" | "controller" | "abilityController" | "sourceController" | "owner" | "eachOpponent" | "eachPlayer" | "target" | "triggeringPlayer" | "defendingPlayer" | "attackingPlayer" | "activePlayer" | "replacedPlayer" | "damageSourceController" | "causeController" | "affectedController" | "affectedOwner" | "triggeringController" | "triggeringOwner" | "triggeringOtherController" | "triggeringOtherOwner" | "current" | "previousPlayer" | "mostLife" | "leastLife" | "mostCardsInHand" | "fewestCardsInHand" | "enchantedPlayer" | "yourTeam" | "chosenPlayer" | "playerToYourLeft" | "playerToYourRight" | "attackedPlayers" | "attackingOpponents" | "attackedBySourceThisTurn" | "attackedBySourceLastCombat" | object — Which player(s) — a player selector (default `you`); `retain?`: "endOfTurn" | "permanent" — CR 106.4: only mana produced by this instruction survives step/phase ends for the specified duration; spending restrictions are preserved; `target?`: PlayerTargetDef — CR 601.2c, 608.2h: player targeted by a contextual quantity; mana still goes to who (default you); `mana`: string | string[] — Mana symbols to produce; {any} chooses a color, {chosen} uses the chosen color, W|U chooses one symbol. An array chooses one whole bundle; `amount?`: ValueDef — Repeat the mana bundle this many times, evaluated on resolution (CR 106.3); `oneColor?`: boolean — Choose a single color for all {any} symbols: mana of any one color; `differentColors?`: boolean — Each mana in this production bundle must have a different color; applies to manual and automatic payment choices (CR 106.3, 608.2d); `colorsFromExiled?`: boolean — Choose from the colors of cards currently exiled with this source (CR 106.3, 607.2a); `colorsAmong?`: { filter?: ObjectFilter; zone?: "battlefield" | "hand" | "graveyard" | "library" | "exile" | "stack" | "command"; who?: any; each?: boolean } — Colors among matching objects: any one of them ({any}), or with each one fixed unit of every such color (CR 105.1, 106.1a, 106.5, 608.2h); `colorsFromCommanderIdentity?`: boolean — Choose from the colors in your commander's color identity (CR 903.4); outside a Commander game no mana is produced; `availableFrom?`: ObjectFilter — Only mana types matching permanents could produce, ignoring their activation costs and spending restrictions (CR 106.7); `colorsOnly?`: boolean — For availableFrom: colors only, excluding colorless mana; `onSpend?`: { spells: ObjectFilter; abilities?: ObjectFilter | "any"; by?: "you"; sharesCreatureTypeWithCommander?: boolean; triggered?: boolean; onceEachTurn?: boolean; separateTriggers?: boolean; effects: EffectDef[] } — CR 106.6: each mana unit carries this rider through manual or automatic payment. triggering refers to the spell paid for; you is the mana ability controller; `restriction?`: { notSpells?: ObjectFilter; spells?: ObjectFilter; abilities?: ObjectFilter | "any"; actions?: ("cumulativeUpkeep" | "foretell" | "morph" | "manifest" | "turnFaceUp" | "equip" | "unlockDoor" | "disturb" | "powerUp")[]; fromExiled?: boolean; spellFrom?: "battlefield" | "hand" | "graveyard" | "library" | "exile" | "stack" | "command"; spellNotFrom?: "battlefield" | "hand" | "graveyard" | "library" | "exile" | "stack" | "command"; costContains?: "X" | "C"; sameColor?: boolean; notGeneric?: boolean; uncounterable?: boolean } — Spending permissions joined by OR across spells, abilities, and actions (CR 106.6). Restricted mana empties normally. - `manaDoesntEmpty` — CR 106.4, 611.2: selected players retain all unspent mana as steps and phases end for this duration. Fields: `who?`: "you" | "controller" | "abilityController" | "sourceController" | "owner" | "eachOpponent" | "eachPlayer" | "target" | "triggeringPlayer" | "defendingPlayer" | "attackingPlayer" | "activePlayer" | "replacedPlayer" | "damageSourceController" | "causeController" | "affectedController" | "affectedOwner" | "triggeringController" | "triggeringOwner" | "triggeringOtherController" | "triggeringOtherOwner" | "current" | "previousPlayer" | "mostLife" | "leastLife" | "mostCardsInHand" | "fewestCardsInHand" | "enchantedPlayer" | "yourTeam" | "chosenPlayer" | "playerToYourLeft" | "playerToYourRight" | "attackedPlayers" | "attackingOpponents" | "attackedBySourceThisTurn" | "attackedBySourceLastCombat" | object — Which player(s) — a player selector (default `you`); `duration?`: "endOfTurn" | "endOfCombat" | "endOfAdditionalCombat" | "untilYourNextTurn" | "untilEndOfYourNextTurn" | "untilEndOfNextTurn" | "untilStackEmpty" | "untilYourNextEndStep" | "untilYourNextUpkeep" | "permanent" | "whileYouControlSource" | "whileYourTurn" — How long it lasts (see Durations on the Relationships & references page). - `loseUnspentMana` — CR 106.4, 608.2c: "… loses all unspent mana" — the selected players' mana pools (restricted and retained mana included) empty now; the mana is lost, not spent. Fields: `who?`: "you" | "controller" | "abilityController" | "sourceController" | "owner" | "eachOpponent" | "eachPlayer" | "target" | "triggeringPlayer" | "defendingPlayer" | "attackingPlayer" | "activePlayer" | "replacedPlayer" | "damageSourceController" | "causeController" | "affectedController" | "affectedOwner" | "triggeringController" | "triggeringOwner" | "triggeringOtherController" | "triggeringOtherOwner" | "current" | "previousPlayer" | "mostLife" | "leastLife" | "mostCardsInHand" | "fewestCardsInHand" | "enchantedPlayer" | "yourTeam" | "chosenPlayer" | "playerToYourLeft" | "playerToYourRight" | "attackedPlayers" | "attackingOpponents" | "attackedBySourceThisTurn" | "attackedBySourceLastCombat" | object — Which player(s) — a player selector (default `you`). - `searchLibrary` — e.g. “search your library for a card, put it into your hand, then shuffle”. Fields: `optional?`: boolean — The searcher may decline the entire search, including its shuffle (CR 701.23, 608.2d); `searcher?`: "searchedPlayer" | "controller" — searchedPlayer: the targeted player searches their own zones; controller: the ability's controller searches the selected players' zones ("Search its controller's graveyard, hand, and library"); otherwise you search a targeted player's zones (CR 701.19a); `target?`: PlayerTargetDef — Declared player target whose library is searched (CR 601.2c); `who?`: "you" | "controller" | "abilityController" | "sourceController" | "owner" | "eachOpponent" | "eachPlayer" | "target" | "triggeringPlayer" | "defendingPlayer" | "attackingPlayer" | "activePlayer" | "replacedPlayer" | "damageSourceController" | "causeController" | "affectedController" | "affectedOwner" | "triggeringController" | "triggeringOwner" | "triggeringOtherController" | "triggeringOtherOwner" | "current" | "previousPlayer" | "mostLife" | "leastLife" | "mostCardsInHand" | "fewestCardsInHand" | "enchantedPlayer" | "yourTeam" | "chosenPlayer" | "playerToYourLeft" | "playerToYourRight" | "attackedPlayers" | "attackingOpponents" | "attackedBySourceThisTurn" | "attackedBySourceLastCombat" | object — Which player(s) — a player selector (default `you`); `filter?`: ObjectFilter — Which objects (ObjectFilter; set fields AND together); `zones?`: ("battlefield" | "hand" | "graveyard" | "library" | "exile" | "stack" | "command")[] — Zones searched together; default library (CR 701.19); `optionalZones?`: boolean — And/or: choose which listed zones to search; shuffle only when library is searched (CR 701.19); `findAll?`: boolean — "Search … for all cards …": every card matching the quality in the searched zones is found — the searcher sees each whole zone, so nothing can be missed (CR 701.19b, Sowing Salt rulings). Use max "any"; `finds?`: ({ filter?: ObjectFilter; max?: any; forEach?: TargetDef })[] — Separate finds with different qualities, excluding already found cards; one final shuffle (CR 701.19); `distinctNames?`: boolean — Found cards must have different names (CR 201.2, 701.19b); `shareLandType?`: boolean — CR 205.3i, 701.23b: found cards share a land type across the group; zero or one card is allowed, including one Wastes; `destination?`: "battlefield" | "hand" | "graveyard" | "library" | "exile" | "stack" | "command" — Zone the objects are put into; `position?`: "top" | "bottom" | { fromTop: number } — Place found cards here after shuffling the remaining library (CR 701.20b, 401.4, 401.7); `then?`: EffectDef[] — Effects on the found set (affected targets), replacing the default move, before the shuffle (CR 608.2c); `distribute?`: { chooser?: "opponent"; target?: PlayerTargetDef; count?: number; destination: "battlefield" | "hand" | "graveyard" | "library" | "exile" | "stack" | "command"; restDestination: "battlefield" | "hand" | "graveyard" | "library" | "exile" | "stack" | "command" } — Choose one found card for destination and put the rest into restDestination; opponent chooses if specified (CR 608.2c); `tapped?`: boolean — Tapped (true) or untapped (false); on an effect that puts something onto the battlefield, it enters tapped; `controllerTarget?`: PlayerTargetDef — CR 110.2a, 601.2c: "put it onto the battlefield under target player's control" - found cards enter under this declared player's control; `reveal?`: boolean — Reveal the cards found / taken; `min?`: ValueDef — Required minimum found (CR 701.19b: a search for cards may find fewer only when it cannot); a computed value for "for that many cards" (CR 107.3, 608.2h); `max?`: ValueDef | "any" — Default 1; computed resolution-time limit or any number of matching cards (CR 701.19); `shuffle?`: boolean — Shuffle the library afterwards. - `shuffle` — CR 701.20: shuffle each selected player library; a target is declared on casting. Fields: `who?`: "you" | "controller" | "abilityController" | "sourceController" | "owner" | "eachOpponent" | "eachPlayer" | "target" | "triggeringPlayer" | "defendingPlayer" | "attackingPlayer" | "activePlayer" | "replacedPlayer" | "damageSourceController" | "causeController" | "affectedController" | "affectedOwner" | "triggeringController" | "triggeringOwner" | "triggeringOtherController" | "triggeringOtherOwner" | "current" | "previousPlayer" | "mostLife" | "leastLife" | "mostCardsInHand" | "fewestCardsInHand" | "enchantedPlayer" | "yourTeam" | "chosenPlayer" | "playerToYourLeft" | "playerToYourRight" | "attackedPlayers" | "attackingOpponents" | "attackedBySourceThisTurn" | "attackedBySourceLastCombat" | object — Which player(s) — a player selector (default `you`); `target?`: PlayerTargetDef — What it acts on (TargetDef). - `shufflePermanentsAndReveal` — Each player shuffles all permanents they own into their library and reveals that many cards. Matching cards enter together for each filter in order across all players. Owners put the rest on the bottom in their chosen order. Fields: `battlefieldGroups`: ObjectFilter[] — An ObjectFilter (all set fields must match). - `exchangeZones` — CR 701.12a, 400.7: "exchange your graveyard and library" - every card in each of the two zones moves to the other at once. Fields: `who?`: "you" | "controller" | "abilityController" | "sourceController" | "owner" | "eachOpponent" | "eachPlayer" | "target" | "triggeringPlayer" | "defendingPlayer" | "attackingPlayer" | "activePlayer" | "replacedPlayer" | "damageSourceController" | "causeController" | "affectedController" | "affectedOwner" | "triggeringController" | "triggeringOwner" | "triggeringOtherController" | "triggeringOtherOwner" | "current" | "previousPlayer" | "mostLife" | "leastLife" | "mostCardsInHand" | "fewestCardsInHand" | "enchantedPlayer" | "yourTeam" | "chosenPlayer" | "playerToYourLeft" | "playerToYourRight" | "attackedPlayers" | "attackingOpponents" | "attackedBySourceThisTurn" | "attackedBySourceLastCombat" | object — Which player(s) — a player selector (default `you`); `zones`: any[] — The two zones exchanged; `shuffle?`: boolean — ", then shuffle": the player shuffles their library afterwards. - `fight` — e.g. “~ fights target creature”. Fields: `target`: TargetDef — What it acts on (TargetDef); `what?`: TargetDef — The creature that fights (default: the source): "target creature you control fights target creature you don't control"; `pairwise?`: boolean — CR 701.14a, 608.2d: pair different creatures; with unequal numbers as many pairs as possible fight; `whenCreatureDies?`: EffectDef[] — Trigger these effects once if a creature dies from that fight at the immediately following state-based action check. - `counterSpell` — CR 701.5, 614.15: counter a spell; if successfully countered, put it in the specified zone instead of its owner's graveyard (library defaults to top unless position specifies otherwise). Fields: `target?`: TargetDef — What it acts on (TargetDef); `destination?`: "exile" | "hand" | "library" — Where the countered spell goes instead of the graveyard (library = top); `position?`: "top" | "bottom" | { chooser: "you" } — CR 401.4, 614.15: placement for a counter into library; chooser chooses top or bottom only if the counter succeeds. - `counterUnlessPays` — CR 701.5, 614.15: counter unless its controller pays amount or cost; destination applies only if countered (library defaults to top unless position specifies otherwise). Fields: `target?`: TargetDef — What it acts on (TargetDef); `amount?`: ValueDef — Generic mana to pay; `cost?`: CostDef — CR 118.12, 608.2c: any other payment instead of amount ("pays {1} and 1 life", "discards their hand"); `ifPaid?`: EffectDef[] — CR 608.2c: "If they do, …" — run for this effect's controller when the payment is made; `ifNotPaid?`: EffectDef[] — CR 608.2c: "If that player doesn't, …" — run when the spell's controller doesn't pay (declined or unable), `current` bound to that player (Power Sink); `destination?`: "exile" | "hand" | "library" — Where the spell goes if it is countered (library = top). - `gainControl` — e.g. “gain control of target creature”. Fields: `target`: TargetDef — What it acts on (TargetDef); `controller?`: PlayerTargetDef — The targeted player who gains control (CR 613.1b); defaults to you; `duration?`: Duration — CR 611.2a-b, 702.26f: continuous-effect duration. Conditional source/target filters are ANDed, identities and you are fixed on resolution, and failure ends the effect permanently. untilEndOfYourNextTurn lasts through your next turn's end step and expires at cleanup; whileYourTurn ends when another player becomes active and cannot start on an opponent's turn. untilYourNextEndStep / untilYourNextUpkeep end as that step begins; endOfCombat ends as the end-combat step ends (CR 511.2); endOfAdditionalCombat lasts through the additional combat phase created before it resolved, ending as that combat's end-combat step ends (CR 500.8, 506.1 — "that combat"). untilEvent ends when the described event happens. perpetual survives zone changes. - `gainControlEachOthers` — CR 611.2c, 613.1b: you and the selected player gain control of each other's matching permanents simultaneously. Either group may be empty. Fields: `target`: PlayerTargetDef — What it acts on (TargetDef); `filter`: ObjectFilter — Which objects (ObjectFilter; set fields AND together); `duration?`: Duration — CR 611.2a-b, 702.26f: continuous-effect duration. Conditional source/target filters are ANDed, identities and you are fixed on resolution, and failure ends the effect permanently. untilEndOfYourNextTurn lasts through your next turn's end step and expires at cleanup; whileYourTurn ends when another player becomes active and cannot start on an opponent's turn. untilYourNextEndStep / untilYourNextUpkeep end as that step begins; endOfCombat ends as the end-combat step ends (CR 511.2); endOfAdditionalCombat lasts through the additional combat phase created before it resolved, ending as that combat's end-combat step ends (CR 500.8, 506.1 — "that combat"). untilEvent ends when the described event happens. perpetual survives zone changes. - `attach` — e.g. “attach ~ to target creature”. Fields: `target`: TargetDef — What it acts on (TargetDef); `what?`: TargetDef — What to attach (default: the source), e.g. a Role token just created; `afterMovingFromCreature?`: EffectDef[] — Resolve only if this actually moved the attachment from a different creature. - `transform` — Transform a transforming permanent (CR 701.28, 712). Fields: `target?`: TargetDef — What it acts on (TargetDef); `convert?`: boolean — Print convert, the same action as transform (CR 701.28). - `flip` — CR 710.2-4: flip a flip permanent; already flipped permanents stay flipped. Fields: `target?`: TargetDef — What it acts on (TargetDef). - `regenerate` — e.g. “regenerate ~”. Fields: `target?`: TargetDef — What it acts on (TargetDef). - `preventDamage` — Prevent the next N (or all) damage that would be dealt to the target this turn (CR 615.7). Fields: `target`: TargetDef — What it acts on (TargetDef); `amount?`: ValueDef — How many / how much (integer or ValueDef); `combatOnly?`: boolean — Only combat damage; `divided?`: boolean — CR 601.2d, 615.7: the amount is divided among the targets as they are chosen (each at least 1); each target gets a shield of its share ("prevent the next 5 damage that would be dealt this turn to any number of targets, divided as you choose"). - `cantPrevent` — CR 615.12: damage cannot be prevented for this duration. Prevention side effects still occur; finite shields retain their budgets. Fields: `duration?`: "endOfTurn" | "endOfCombat" | "endOfAdditionalCombat" | "untilYourNextTurn" | "untilEndOfYourNextTurn" | "untilEndOfNextTurn" | "untilStackEmpty" | "untilYourNextEndStep" | "untilYourNextUpkeep" | "permanent" | "whileYouControlSource" | "whileYourTurn" — How long it lasts (see Durations on the Relationships & references page). - `digTop` — e.g. “look at the top a card of your library. Put up to one of them into your hand. Put the rest on the bottom of your library”. Fields: `exile?`: boolean — CR 406.1, 608.2c: exile the examined cards before picks, then route the uncast cards with restTo; `amount?`: ValueDef — How many / how much (integer or ValueDef); `until?`: ObjectFilter — Stop when a card matching this filter is revealed; `untilCount?`: ValueDef — How many matching cards to find before stopping; `reveal?`: boolean — Reveal the cards found / taken; `who?`: "you" | "controller" | "abilityController" | "sourceController" | "owner" | "eachOpponent" | "eachPlayer" | "target" | "triggeringPlayer" | "defendingPlayer" | "attackingPlayer" | "activePlayer" | "replacedPlayer" | "damageSourceController" | "causeController" | "affectedController" | "affectedOwner" | "triggeringController" | "triggeringOwner" | "triggeringOtherController" | "triggeringOtherOwner" | "current" | "previousPlayer" | "mostLife" | "leastLife" | "mostCardsInHand" | "fewestCardsInHand" | "enchantedPlayer" | "yourTeam" | "chosenPlayer" | "playerToYourLeft" | "playerToYourRight" | "attackedPlayers" | "attackingOpponents" | "attackedBySourceThisTurn" | "attackedBySourceLastCombat" | object — Which player(s) — a player selector (default `you`); `target?`: PlayerTargetDef — What it acts on (TargetDef); `chooser?`: "you" | "controller" | "abilityController" | "sourceController" | "owner" | "eachOpponent" | "eachPlayer" | "target" | "triggeringPlayer" | "defendingPlayer" | "attackingPlayer" | "activePlayer" | "replacedPlayer" | "damageSourceController" | "causeController" | "affectedController" | "affectedOwner" | "triggeringController" | "triggeringOwner" | "triggeringOtherController" | "triggeringOtherOwner" | "current" | "previousPlayer" | "mostLife" | "leastLife" | "mostCardsInHand" | "fewestCardsInHand" | "enchantedPlayer" | "yourTeam" | "chosenPlayer" | "playerToYourLeft" | "playerToYourRight" | "attackedPlayers" | "attackingOpponents" | "attackedBySourceThisTurn" | "attackedBySourceLastCombat" | object | "opponent" | "thatPlayer" — Who chooses among the cards looked at (defaults to the digging player); `piles?`: { separator?: "you" | "opponent" | "target"; chooser?: "you" | "opponent"; faceDown?: boolean } — Partition into two possibly empty piles, then choose one. Picks apply to that pile; all unpicked cards use restTo. faceDown hides the first pile from its chooser (CR 700.3a-d); `picks?`: ({ position?: "top" | "bottom"; faceDown?: boolean; take: number | "all" | "any"; min?: number; filter?: ObjectFilter; destination?: "battlefield" | "hand" | "graveyard" | "library" | "exile" | "stack" | "command"; tapped?: boolean; withCounters?: any; optional?: boolean; order?: "first" | "chosen" | "random"; attacking?: boolean | "defendingPlayer"; ifNonePicked?: boolean; maxTotalManaValue?: ValueDef; then?: EffectDef[]; castFree?: boolean; castPayCost?: boolean; reveal?: boolean; controller?: "you" | "owner" | "opponent" })[] — What the player takes from the cards looked at: each pick `{ take, filter?, destination?, position?, tapped?, … }`; `take?`: number — How many cards this pick takes; `min?`: number — Minimum number of selections / required amount; `optional?`: boolean — "You may": the player chooses whether to do it; `filter?`: ObjectFilter — Which objects (ObjectFilter; set fields AND together); `restTo?`: "bottom" | "graveyard" | "hand" | "exile" | "shuffle" | "top" — Where the unpicked cards go (default the bottom of the library); `restOrder?`: "random" | "chosen" — Order of the unpicked cards: `random` or `chosen` by the player; `restFaceDown?`: boolean — Unpicked cards go to their zone face down; `shuffleFirst?`: boolean — CR 701.24a: shuffle the library after the examination, then place the rest by identity ("Then shuffle and put the cards you looked at this way on top in any order"); `link?`: boolean — CR 406.3 / 607.2a: cards this examination exiles (the rest or a pick) are "exiled with" the source, so "cast a card exiled with ~" finds them; `pool?`: boolean — CR 608.2c-d: with several examining players, the picks choose among all their examined cards together ("Choose one of the revealed creature cards"); the rest go to their owners' zones; `destination?`: "battlefield" | "hand" | "graveyard" | "library" | "exile" | "stack" | "command" — Zone the objects are put into; `withCounters?`: object | object[] — CR 122.6, 614.1c: all matching additional counters are placed as the permanent enters, before triggers; `tapped?`: boolean — Tapped (true) or untapped (false); on an effect that puts something onto the battlefield, it enters tapped. - `separatePiles` — CR 700.3: separate cards from any zone into two piles, let a player choose one, then do things with each pile ("separate them into a face-down pile and a face-up pile. An opponent chooses one of those piles. Put that pile into your hand and exile the rest"). Fields: `target`: { of: "object" | "player" | "spell" | "ability" | "spellOrAbility" | "any"; slot?: string; mode?: "chosen" | "choose" | "all" | "self" | "random" | "host" | "triggering" | "created" | "convoked" | "linked" | "paired" | "top" | "affected" | "replaced" | "replacedSource" | "triggeringOther" | "about" | "thisWay" | "costPaid" | "attacked" | "grantor"; action?: "sacrificed" | "milled" | "destroyed" | "exiled" | "discarded" | "returned" | "putIntoLibrary" | "tapped" | "untapped" | "damaged" | "drawn" | "revealed" | "countersPlaced" | "countersRemoved" | "amassed" | "countered" | "phasedOut" | "searched" | "created"; among?: "triggering"; chooser?: any; random?: true; zone?: "battlefield" | "hand" | "graveyard" | "library" | "exile" | "stack" | "command"; allZones?: boolean; position?: "top" | "bottom"; filter?: ObjectFilter; player?: any; playerOwns?: true; exceptPlayer?: any; playerFilter?: "opponent"; sameZoneOwner?: boolean; maxTotalManaValue?: ValueDef; maxTotalPower?: ValueDef; distinctBy?: "name" | "manaValue" | "controller" | "power"; equalBy?: "toughness" | "power" | "manaValue"; sharesType?: "card" | "permanent"; sharedBy?: "creatureType"; zones?: ("battlefield" | "hand" | "graveyard" | "library" | "exile" | "stack" | "command")[]; playerTarget?: PlayerTargetDef; digSubset?: "looked" | "picked" | "rest"; span?: number; targetCount?: number; targetsOnlySource?: boolean; permanents?: true; stackTargets?: object; spell?: object; ability?: object; min?: ValueDef; max?: ValueDef | "any"; differentFromEarlierTargets?: boolean; attacker?: "self" | "triggering"; label?: string } — The cards to separate: a graveyard selection, the top cards of a library (mode top), or "those cards" (mode affected); `separator?`: "you" | "opponent" — Who splits the cards into two piles (default you); `chooser?`: "you" | "opponent" | "target" — Who picks a pile (default you); an opponent is chosen on resolution when there are several; target is the declared player whose permanents are separated ("… in the pile of their choice"); `faceDown?`: boolean — CR 700.3d: the first pile stays face down for a chooser who didn't separate it; `reveal?`: boolean — Reveal the set before separating it; `chosen?`: EffectDef[] — Effects on the chosen pile: target mode affected is "those cards"; `rest?`: EffectDef[] — Effects on the other pile: target mode affected is "those cards". - `becomeCopy` — e.g. “~ becomes a copy of target creature until end of turn”. Fields: `target`: TargetDef — What it acts on (TargetDef); `applyTo?`: TargetDef — What the replacement watches (default the source itself; `mode: "all"` + filter for a group, a player selector for player events); `duration?`: Duration — CR 611.2a-b, 702.26f: continuous-effect duration. Conditional source/target filters are ANDed, identities and you are fixed on resolution, and failure ends the effect permanently. untilEndOfYourNextTurn lasts through your next turn's end step and expires at cleanup; whileYourTurn ends when another player becomes active and cannot start on an opponent's turn. untilYourNextEndStep / untilYourNextUpkeep end as that step begins; endOfCombat ends as the end-combat step ends (CR 511.2); endOfAdditionalCombat lasts through the additional combat phase created before it resolved, ending as that combat's end-combat step ends (CR 500.8, 506.1 — "that combat"). untilEvent ends when the described event happens. perpetual survives zone changes; `except?`: { keywords?: string[]; keywordAbilities?: KeywordAbilityDef[]; abilities?: any[]; addTypes?: string[]; addSubtypes?: string[]; setTypes?: string[]; setSubtypes?: string[]; removeSubtypes?: string[]; colors?: string[]; addColors?: string[]; power?: ValueDef; toughness?: ValueDef; loyalty?: ValueDef; notLegendary?: boolean; legendary?: boolean; name?: string; noManaCost?: boolean } — Except: changes to the copied characteristics (CR 707.9). - `becomeType` — e.g. “target creature becomes a in addition to its other types until end of turn”. Fields: `subtypeKind?`: "creatureType" | "basicLandType" — Replace only this subtype family; an empty subtype list removes all of it (CR 205.3, 613.1d); `allCreatureTypes?`: boolean — Gain all creature types without gaining changeling (CR 205.3m); `target`: TargetDef — What it acts on (TargetDef); `chosenSubtype?`: boolean | string — Snapshot the earlier chosen subtype; true reads creatureType, a string names its key (CR 205.3, 608.2d); `types?`: string[] — Card types, e.g. ["Artifact", "Creature"]; `subtypes?`: string[] — Subtypes, e.g. ["Elf", "Warrior"]; `supertypes?`: string[] — Supertypes gained ("becomes a legendary 4/4 … creature", "becomes snow"); kept even when `replace` sets the card types (CR 205.4a, 613.1d); `replace?`: boolean — Replace the existing types / colors instead of adding to them; `duration?`: Duration — CR 611.2a-b, 702.26f: continuous-effect duration. Conditional source/target filters are ANDed, identities and you are fixed on resolution, and failure ends the effect permanently. untilEndOfYourNextTurn lasts through your next turn's end step and expires at cleanup; whileYourTurn ends when another player becomes active and cannot start on an opponent's turn. untilYourNextEndStep / untilYourNextUpkeep end as that step begins; endOfCombat ends as the end-combat step ends (CR 511.2); endOfAdditionalCombat lasts through the additional combat phase created before it resolved, ending as that combat's end-combat step ends (CR 500.8, 506.1 — "that combat"). untilEvent ends when the described event happens. perpetual survives zone changes. - `removeTypes` — CR 205.1a, 613.1d: a resolving effect removes card types, supertypes or subtypes for a duration ("this creature isn't a creature until end of turn"). Fields: `target`: TargetDef — What it acts on (TargetDef); `types?`: string[] — Card types removed ("isn't a creature"); the subtypes only they had go with them (CR 205.1a); `supertypes?`: string[] — Supertypes removed ("isn't snow", "is no longer snow"); `subtypes?`: string[] — Subtypes removed ("isn't a Human"); `duration?`: Duration — CR 611.2a-b, 702.26f: continuous-effect duration. Conditional source/target filters are ANDed, identities and you are fixed on resolution, and failure ends the effect permanently. untilEndOfYourNextTurn lasts through your next turn's end step and expires at cleanup; whileYourTurn ends when another player becomes active and cannot start on an opponent's turn. untilYourNextEndStep / untilYourNextUpkeep end as that step begins; endOfCombat ends as the end-combat step ends (CR 511.2); endOfAdditionalCombat lasts through the additional combat phase created before it resolved, ending as that combat's end-combat step ends (CR 500.8, 506.1 — "that combat"). untilEvent ends when the described event happens. perpetual survives zone changes. - `becomeColor` — e.g. “target creature becomes colorless until end of turn”. Fields: `target`: TargetDef — What it acts on (TargetDef); `colors`: string[] — Colors as W / U / B / R / G codes; `chosenColor?`: boolean | string — Use the earlier chosen color instead of colors (CR 105.3, 608.2d); `colorsOfChoice?`: boolean — "The color or colors of your choice": one or more colors chosen as it resolves (CR 105.2, 608.2d); colors is then []; `replace?`: boolean — Replace the existing types / colors instead of adding to them; `duration?`: Duration — CR 611.2a-b, 702.26f: continuous-effect duration. Conditional source/target filters are ANDed, identities and you are fixed on resolution, and failure ends the effect permanently. untilEndOfYourNextTurn lasts through your next turn's end step and expires at cleanup; whileYourTurn ends when another player becomes active and cannot start on an opponent's turn. untilYourNextEndStep / untilYourNextUpkeep end as that step begins; endOfCombat ends as the end-combat step ends (CR 511.2); endOfAdditionalCombat lasts through the additional combat phase created before it resolved, ending as that combat's end-combat step ends (CR 500.8, 506.1 — "that combat"). untilEvent ends when the described event happens. perpetual survives zone changes. - `loseAbilities` — e.g. “target creature loses all abilities until end of turn”. Fields: `target`: TargetDef — What it acts on (TargetDef); `duration?`: Duration — CR 611.2a-b, 702.26f: continuous-effect duration. Conditional source/target filters are ANDed, identities and you are fixed on resolution, and failure ends the effect permanently. untilEndOfYourNextTurn lasts through your next turn's end step and expires at cleanup; whileYourTurn ends when another player becomes active and cannot start on an opponent's turn. untilYourNextEndStep / untilYourNextUpkeep end as that step begins; endOfCombat ends as the end-combat step ends (CR 511.2); endOfAdditionalCombat lasts through the additional combat phase created before it resolved, ending as that combat's end-combat step ends (CR 500.8, 506.1 — "that combat"). untilEvent ends when the described event happens. perpetual survives zone changes. - `loseAbility` — CR 613.1f: the selected permanents lose one printed ability — `this` is the resolving ability ("this creature loses this ability"), a number a printed index; the other abilities keep their positions. Fields: `target`: TargetDef — What it acts on (TargetDef); `ability`: "this" | number — Which printed ability is lost: `this` (the resolving ability) or the index of a printed ability; `duration?`: Duration — CR 611.2a-b, 702.26f: continuous-effect duration. Conditional source/target filters are ANDed, identities and you are fixed on resolution, and failure ends the effect permanently. untilEndOfYourNextTurn lasts through your next turn's end step and expires at cleanup; whileYourTurn ends when another player becomes active and cannot start on an opponent's turn. untilYourNextEndStep / untilYourNextUpkeep end as that step begins; endOfCombat ends as the end-combat step ends (CR 511.2); endOfAdditionalCombat lasts through the additional combat phase created before it resolved, ending as that combat's end-combat step ends (CR 500.8, 506.1 — "that combat"). untilEvent ends when the described event happens. perpetual survives zone changes. - `endable` — CR 116.2c: "You may pay {W} to end this effect." — run the effects; every continuous effect they create belongs to one group that the player may end as a special action, any time they have priority, by paying the cost. Ending them all at once lets a Licid stop being an Aura and come unattached (CR 704.5n). Fields: `cost`: CostDef — The cost (CostDef); `who?`: "you" | "controller" | "abilityController" | "sourceController" | "owner" | "eachOpponent" | "eachPlayer" | "target" | "triggeringPlayer" | "defendingPlayer" | "attackingPlayer" | "activePlayer" | "replacedPlayer" | "damageSourceController" | "causeController" | "affectedController" | "affectedOwner" | "triggeringController" | "triggeringOwner" | "triggeringOtherController" | "triggeringOtherOwner" | "current" | "previousPlayer" | "mostLife" | "leastLife" | "mostCardsInHand" | "fewestCardsInHand" | "enchantedPlayer" | "yourTeam" | "chosenPlayer" | "playerToYourLeft" | "playerToYourRight" | "attackedPlayers" | "attackingOpponents" | "attackedBySourceThisTurn" | "attackedBySourceLastCombat" | object — Who may end it (default: the controller); `label?`: string — Shown with the special action; `then`: EffectDef[] — Effects that follow ("then …", "if you do …"). - `removeKeyword` — Remove this keyword in layer 6; use permanent for a printed loss with no stated duration (CR 611.2a, 613.1f). Fields: `target`: TargetDef — What it acts on (TargetDef); `keyword`: string — A plain keyword string ("Flying", "Haste" …) as in `keywords[]`; `cantHave?`: boolean — CR 101.2, 613.1f: also cannot have or gain this keyword during the duration, even from later grants; `duration?`: Duration — CR 611.2a-b, 702.26f: continuous-effect duration. Conditional source/target filters are ANDed, identities and you are fixed on resolution, and failure ends the effect permanently. untilEndOfYourNextTurn lasts through your next turn's end step and expires at cleanup; whileYourTurn ends when another player becomes active and cannot start on an opponent's turn. untilYourNextEndStep / untilYourNextUpkeep end as that step begins; endOfCombat ends as the end-combat step ends (CR 511.2); endOfAdditionalCombat lasts through the additional combat phase created before it resolved, ending as that combat's end-combat step ends (CR 500.8, 506.1 — "that combat"). untilEvent ends when the described event happens. perpetual survives zone changes. - `removeKeywordAbilities` — Lose every ability of this parametrised family, including earlier grants; later grants still apply (CR 702.14, 702.22, 613.1f). Fields: `target`: TargetDef — What it acts on (TargetDef); `keyword`: "landwalk" | "bandsWithOther" | "enchant" — The parametrised family removed (landwalk, bands with other); `duration?`: Duration — CR 611.2a-b, 702.26f: continuous-effect duration. Conditional source/target filters are ANDed, identities and you are fixed on resolution, and failure ends the effect permanently. untilEndOfYourNextTurn lasts through your next turn's end step and expires at cleanup; whileYourTurn ends when another player becomes active and cannot start on an opponent's turn. untilYourNextEndStep / untilYourNextUpkeep end as that step begins; endOfCombat ends as the end-combat step ends (CR 511.2); endOfAdditionalCombat lasts through the additional combat phase created before it resolved, ending as that combat's end-combat step ends (CR 500.8, 506.1 — "that combat"). untilEvent ends when the described event happens. perpetual survives zone changes. - `grantAbility` — CR 113.7a, 611.2, 707.9: grant an ability, or copy the resolving ability with this. Perpetual grants follow the card across zones. Fields: `target`: TargetDef — What it acts on (TargetDef); `ability`: AbilityDef | "this" — The ability granted (an AbilityDef); `duration?`: Duration — CR 611.2a-b, 702.26f: continuous-effect duration. Conditional source/target filters are ANDed, identities and you are fixed on resolution, and failure ends the effect permanently. untilEndOfYourNextTurn lasts through your next turn's end step and expires at cleanup; whileYourTurn ends when another player becomes active and cannot start on an opponent's turn. untilYourNextEndStep / untilYourNextUpkeep end as that step begins; endOfCombat ends as the end-combat step ends (CR 511.2); endOfAdditionalCombat lasts through the additional combat phase created before it resolved, ending as that combat's end-combat step ends (CR 500.8, 506.1 — "that combat"). untilEvent ends when the described event happens. perpetual survives zone changes. - `grantKeywordAbility` — Grant a parametrised keyword ability ("gains bands with other Dinosaurs", "has ward {2} until end of turn"). Fields: `target`: TargetDef — What it acts on (TargetDef); `keywordAbility`: KeywordAbilityDef | KeywordAbilityDef[] — A parametrised keyword ability (KeywordAbilityDef: `{ "keyword": "ward", "cost": { … } }`); `duration?`: Duration — CR 611.2a-b, 702.26f: continuous-effect duration. Conditional source/target filters are ANDed, identities and you are fixed on resolution, and failure ends the effect permanently. untilEndOfYourNextTurn lasts through your next turn's end step and expires at cleanup; whileYourTurn ends when another player becomes active and cannot start on an opponent's turn. untilYourNextEndStep / untilYourNextUpkeep end as that step begins; endOfCombat ends as the end-combat step ends (CR 511.2); endOfAdditionalCombat lasts through the additional combat phase created before it resolved, ending as that combat's end-combat step ends (CR 500.8, 506.1 — "that combat"). untilEvent ends when the described event happens. perpetual survives zone changes. - `gainAbilitiesOf` — CR 611.2c, 613.1f: "gains all activated abilities of target creature until end of turn" — the targets have the from objects' abilities (fixed on resolution) for the duration; each gained ability refers to the object that has it. Fields: `target`: TargetDef — What it acts on (TargetDef); `from`: { of: "object" | "player" | "spell" | "ability" | "spellOrAbility" | "any"; slot?: string; mode?: "chosen" | "choose" | "all" | "self" | "random" | "host" | "triggering" | "created" | "convoked" | "linked" | "paired" | "top" | "affected" | "replaced" | "replacedSource" | "triggeringOther" | "about" | "thisWay" | "costPaid" | "attacked" | "grantor"; action?: "sacrificed" | "milled" | "destroyed" | "exiled" | "discarded" | "returned" | "putIntoLibrary" | "tapped" | "untapped" | "damaged" | "drawn" | "revealed" | "countersPlaced" | "countersRemoved" | "amassed" | "countered" | "phasedOut" | "searched" | "created"; among?: "triggering"; chooser?: any; random?: true; zone?: "battlefield" | "hand" | "graveyard" | "library" | "exile" | "stack" | "command"; allZones?: boolean; position?: "top" | "bottom"; filter?: ObjectFilter; player?: any; playerOwns?: true; exceptPlayer?: any; playerFilter?: "opponent"; sameZoneOwner?: boolean; maxTotalManaValue?: ValueDef; maxTotalPower?: ValueDef; distinctBy?: "name" | "manaValue" | "controller" | "power"; equalBy?: "toughness" | "power" | "manaValue"; sharesType?: "card" | "permanent"; sharedBy?: "creatureType"; zones?: ("battlefield" | "hand" | "graveyard" | "library" | "exile" | "stack" | "command")[]; playerTarget?: PlayerTargetDef; digSubset?: "looked" | "picked" | "rest"; span?: number; targetCount?: number; targetsOnlySource?: boolean; permanents?: true; stackTargets?: object; spell?: object; ability?: object; min?: ValueDef; max?: ValueDef | "any"; differentFromEarlierTargets?: boolean; attacker?: "self" | "triggering"; label?: string } — The objects whose abilities are gained, as they exist on resolution (a chosen target, the linked exiled cards, a zone set); `kinds?`: ("activated" | "triggered" | "static" | "keyword")[] — Which classes of abilities (default all): activated includes loyalty and mana abilities, static includes replacement effects, keyword covers simple keywords and parametrised keyword abilities; `spendAsAny?`: { colors?: ("W" | "U" | "B" | "R" | "G")[] } — CR 609.4b, 613.1f: "You may spend mana as though it were mana of any color to activate those abilities" — the costs of the gained activated abilities may be paid with mana of any color; `duration?`: Duration — CR 611.2a-b, 702.26f: continuous-effect duration. Conditional source/target filters are ANDed, identities and you are fixed on resolution, and failure ends the effect permanently. untilEndOfYourNextTurn lasts through your next turn's end step and expires at cleanup; whileYourTurn ends when another player becomes active and cannot start on an opponent's turn. untilYourNextEndStep / untilYourNextUpkeep end as that step begins; endOfCombat ends as the end-combat step ends (CR 511.2); endOfAdditionalCombat lasts through the additional combat phase created before it resolved, ending as that combat's end-combat step ends (CR 500.8, 506.1 — "that combat"). untilEvent ends when the described event happens. perpetual survives zone changes; `chooseKeyword?`: boolean — Each recipient gains up to one keyword ability of its controller's choice. - `setPT` — CR 107.3, 611.2c, 613.4b: set base power/toughness to values fixed on resolution, including X/X. Fields: `target`: TargetDef — What it acts on (TargetDef); `power?`: ValueDef — Base power; omitted leaves it unchanged; `toughness?`: ValueDef — Base toughness; omitted leaves it unchanged; `duration?`: Duration — CR 611.2a-b, 702.26f: continuous-effect duration. Conditional source/target filters are ANDed, identities and you are fixed on resolution, and failure ends the effect permanently. untilEndOfYourNextTurn lasts through your next turn's end step and expires at cleanup; whileYourTurn ends when another player becomes active and cannot start on an opponent's turn. untilYourNextEndStep / untilYourNextUpkeep end as that step begins; endOfCombat ends as the end-combat step ends (CR 511.2); endOfAdditionalCombat lasts through the additional combat phase created before it resolved, ending as that combat's end-combat step ends (CR 500.8, 506.1 — "that combat"). untilEvent ends when the described event happens. perpetual survives zone changes. - `exchangeBasePower` — CR 701.12a/g, 208.4b, 613.4b: simultaneously exchange two legal creatures' base power, before counters and bonuses. Neither changes if either target is illegal; perpetual survives zone changes. Fields: `target`: TargetDef — What it acts on (TargetDef); `second`: TargetDef — The second object of the exchange (default the source); `duration?`: Duration — CR 611.2a-b, 702.26f: continuous-effect duration. Conditional source/target filters are ANDed, identities and you are fixed on resolution, and failure ends the effect permanently. untilEndOfYourNextTurn lasts through your next turn's end step and expires at cleanup; whileYourTurn ends when another player becomes active and cannot start on an opponent's turn. untilYourNextEndStep / untilYourNextUpkeep end as that step begins; endOfCombat ends as the end-combat step ends (CR 511.2); endOfAdditionalCombat lasts through the additional combat phase created before it resolved, ending as that combat's end-combat step ends (CR 500.8, 506.1 — "that combat"). untilEvent ends when the described event happens. perpetual survives zone changes. - `switchPT` — e.g. “switch target creature's power and toughness until end of turn”. Fields: `target`: TargetDef — What it acts on (TargetDef); `duration?`: Duration — CR 611.2a-b, 702.26f: continuous-effect duration. Conditional source/target filters are ANDed, identities and you are fixed on resolution, and failure ends the effect permanently. untilEndOfYourNextTurn lasts through your next turn's end step and expires at cleanup; whileYourTurn ends when another player becomes active and cannot start on an opponent's turn. untilYourNextEndStep / untilYourNextUpkeep end as that step begins; endOfCombat ends as the end-combat step ends (CR 511.2); endOfAdditionalCombat lasts through the additional combat phase created before it resolved, ending as that combat's end-combat step ends (CR 500.8, 506.1 — "that combat"). untilEvent ends when the described event happens. perpetual survives zone changes. - `becomeBlocked` — CR 509.1h: each selected attacking creature becomes blocked (without blockers) if it isn't already; "becomes blocked" abilities trigger. Nothing happens to a creature that isn't attacking. Fields: `target`: TargetDef — What it acts on (TargetDef).