# Drawstep engine wiki — Conditions > “If”, “as long as” and intervening-if clauses, composable with all / any / not. Engine: Magic: The Gathering (`mtg`). Page: https://drawstep.xyz/wiki/mtg/conditions · Raw Markdown: https://drawstep.xyz/wiki/mtg/conditions.md · Complete AI pack (every topic in one document, with the output contract and worked examples): https://drawstep.xyz/wiki/drawstep-mtg-ai-pack.md. This page is generated from Drawstep's card schema; field names and discriminators are exact. A card definition is one JSON object; anything the vocabulary cannot express goes verbatim into `unparsed` instead of being approximated. ## Conditions (`ConditionDef`, discriminator `kind`) Used by `if` effects, `trigger.condition` (intervening if), static `condition` ("as long as"), activated `onlyIf`, replacement `unless`. - `native` — A predicate evaluated 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 condition stands for. - `kicked` — Kicker was paid when the source, or the triggering spell, was cast (CR 702.33). Fields: `of?`: "triggering" — Which variant of the value is read; `kicker?`: string — CR 702.33b, 702.33f: "if it was kicked with its {1}{U} kicker" on a card with two kicker costs — the printed mana cost of the linked kicker ability; true only when that cost was paid. - `bargained` — CR 702.166, 601.2b: the source or triggering spell was bargained; remembers the actual casting choice after the spell leaves the stack. Fields: `of?`: "triggering" — Which variant of the value is read. - `costPaidMatches` — CR 601.2h, 602.2b, 608.2h: exactly one object was sacrificed / discarded to pay this spell's or ability's cost and its characteristics immediately before the payment match the filter ("if the sacrificed creature was a Human", "if the discarded card was a creature card"). Fields: `cost`: "sacrifice" | "discard" | "returnToHand" — Which cost component: the sacrificed object, the discarded card, or the permanent returned to its owner's hand (as it last existed on the battlefield); `noun?`: "creature" | "permanent" | "artifact" | "card" | "land" — The printed noun ("the sacrificed permanent", "the discarded card", "that land"); `filter`: ObjectFilter — Which objects (ObjectFilter; set fields AND together); `thisWay?`: "passive" | "active" — The printed "this way" wording of the same test: passive "if a Saproling was sacrificed this way", active "if you sacrificed a Klingon this way". - `choseOption` — CR 101.4, 608.2d: all selected players chose this option; empty selection is false. Without who reads the local/source choice; default key option. Fields: `option`: string — The named option chosen — as the source entered, in a vote or in a secret choice ("if Khans was chosen"); `key?`: string — Storage key of a noted value or choice (defaults to the choice's kind); `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`). - `guessedRight` — CR 608.2c-d: the player of an earlier `guess` in this resolution guessed right ("If they guessed right, remove Gollum from combat. Otherwise, …"). Fields: `key?`: string — The guess's key; default "guess". - `triggeringOtherInZone` — CR 603.4, 400.7: the event's other object remains in this zone with the same identity; a leave-and-return does not qualify. Fields: `zone`: "battlefield" | "hand" | "graveyard" | "library" | "exile" | "stack" | "command" — A zone name (battlefield, hand, graveyard, library, exile, stack, command). - `triggeringMatches` — The triggering object matches this filter, using last known information (CR 608.2h). Fields: `filter`: ObjectFilter — Which objects (ObjectFilter; set fields AND together); `atEvent?`: boolean — CR 603.10a, 608.2h: use characteristics immediately before the triggering event, including counters on a departing permanent; `batch?`: "any" — CR 603.2c, 603.4: a one-or-more trigger — at least one object of the simultaneous event matches ("if one or more of them entered from a graveyard"). - `triggeringAbilityKind` — CR 603.4, 605.1a: the activated ability that triggered an activatesAbility trigger is of this kind ("if it isn't a mana ability" is nonMana). Fields: `abilityKind`: "nonMana" | "loyalty" | "boast" | "exhaust" | "ninjutsu" | "powerUp" | "crew" | "saddle" | "cycling" | "outlast" | "embalm" | "eternalize" — The kind of activated ability (nonMana, loyalty, boast, exhaust, ninjutsu, powerUp, crew, saddle, cycling). - `compare` — e.g. “1 is at least 1”. Fields: `a`: ValueDef — The first operand; `op`: ">=" | "<=" | "==" | "!=" | ">" | "<" — Comparison of `a` with `b`; `b`: ValueDef — The second operand. - `controls` — e.g. “you control a permanent”. 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`); `filter?`: ObjectFilter — Which objects (ObjectFilter; set fields AND together); `min?`: number — Minimum number of selections / required amount. - `playerIs` — CR 102.2-3, 109.5: the selected player is you or your opponent (teammates are not opponents); requires a nonempty selection, all matching. 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`); `is`: "you" | "opponent" — The phase / time of day being tested. - `isYourTurn` — e.g. “it's your turn”. No fields. - `isDefendingPlayer` — CR 506.2: the player (default you) is the defending player of the triggering attacking creature ("if you're the defending player"). 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`). - `attackedThisStep` — CR 508.1, 508.6: you were declared attacked this declare attackers step; attacking your planeswalker or battle does not count. No fields. - `fullParty` — CR 700.8: you control four distinct creatures filling the Cleric, Rogue, Warrior and Wizard roles. No fields. - `sourceTapped` — e.g. “~ is tapped”. No fields. - `sourceAttacking` — e.g. “~ is attacking”. No fields. - `sourceInZone` — CR 113.6, 400.7, 603.4: the same source incarnation remains in the specified zone, optionally owned by a selected player. Fields: `zone`: "battlefield" | "hand" | "graveyard" | "library" | "exile" | "stack" | "command" — A zone name (battlefield, hand, graveyard, library, exile, stack, command); `owner?`: "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 zone the source must be in. - `resolutionOrdinal` — CR 608.2: this is the Nth actual resolution of this ability this turn; includes this resolution and excludes countered abilities. Fields: `ordinal`: number — Which occurrence (1 = first, 2 = second …). - `dayNight` — It is currently day / night / neither (CR 730.1). Fields: `is`: "day" | "night" | "neither" — Day, night, or neither. - `hasDesignation` — The source has this designation (monstrous, renowned, saddled, …). Fields: `designation`: string — A designation name (monarch, monstrous, renowned, saddled, suspected, prepared …). - `sourceThisTurn` — The source attacked / entered / blocked / attacked or blocked / dealt combat damage this turn (or this combat). Fields: `did`: "attacked" | "entered" | "blocked" | "attackedOrBlocked" | "dealtCombatDamage" | "exerted" — What the source did this turn; `combat?`: boolean — Only this combat phase counts (CR 506.1): "if this creature attacked or blocked this combat". - `sourceAbilityActivatedThisTurn` — Checks whether the specified ability of this object was activated this turn. The activation counts even if the ability was countered. Fields: `index`: number — Zero-based index of the source's activated ability. - `sourceDealtDamage` — The source has dealt damage since it entered its current zone, by any means (CR 120.3, 400.7): "as long as it hasn't dealt damage yet" is this inside `not`. No fields. - `sourceAboveInGraveyard` — CR 400.7, 603.4: the source is in its owner's graveyard with cards put there after it: `direct` the card directly above it matches the filter ("with a creature card directly above it"); otherwise at least `min` (default 1) of the cards above it match ("with three or more creature cards above it"). Fields: `filter`: ObjectFilter — Which objects (ObjectFilter; set fields AND together); `min?`: number — Minimum number of selections / required amount; `direct?`: boolean — Only the card directly above the source counts ("with a creature card directly above it"); otherwise any card put there after it. - `controlsSourcePlaneswalker` — CR 400.7: you still control the same planeswalker object this ability came from. No fields. - `castDuringYourTurn` — CR 601.2, 608.2h: actually cast by you on your own turn, captured when cast; copies do not count. No fields. - `castAfterExile` — CR 702.143c, 702.170: the card was foretold/plotted immediately before casting, even if another cost was used; excludes spell copies. Fields: `designation`: "foretold" | "plotted" — How the card was exiled before it was cast: foretold or plotted. - `castDuringOpponentTurn` — CR 601.2: you cast this during an opponent's turn, captured when cast. No fields. - `castDuringMainPhase` — CR 601.2, 608.2h: you cast this spell during your main phase, captured when cast; uncast copies do not qualify. No fields. - `anotherSpellCastThisTurn` — Another actual spell cast by you this turn, excluding this spell itself if it was cast. No fields. - `castOrdinal` — CR 601.2i: this was your Nth actual spell cast this turn (optionally creature spells only). Fields: `ordinal`: number — Which occurrence (1 = first, 2 = second …); `creatureOnly?`: boolean — Count only creature spells. - `castAnotherNamedSpell` — CR 601.2i, 707.10: this spell's controller has cast another spell of the given name this game, including a countered spell. Putting a copy on the stack is not a cast. Fields: `name`: string — Printed name. On an ability: its ability word ("Hellfire Retribution"), shown in the English rendering, on the stack and in the log. - `castFrom` — The source spell was cast from this zone. Set owner to you when the printed rule requires your own hand or other zone. Fields: `zone`: "battlefield" | "hand" | "graveyard" | "library" | "exile" | "stack" | "command" — A zone name (battlefield, hand, graveyard, library, exile, stack, command); `owner?`: "you" — Whose zone (player selector). - `wasCast` — CR 400.7, 603.4: the entering object, or the source outside an enters-trigger context, was actually cast, optionally by you; direct entries and uncast copies fail. Fields: `by?`: "you" — Whose action it is, or which kind of source. - `castWith` — The source spell was cast with this alternative cost (blitz, dash, …). Fields: `alternative`: string — The alternative or additional cost the spell was cast with (a keyword ability id: `alternativeCost`, `flashback`, `evoke`, `dash` …). - `asCast` — CR 601.2i, 608.2h: the inner condition as it stood when this spell became cast ("if you controlled a Faerie as you cast this spell"); recorded as casting completes and kept by the permanent the spell becomes; false for an object that wasn't cast; a copy inherits it (CR 707.10). Fields: `condition`: ConditionDef — A ConditionDef that must hold. - `revealedToCast` — CR 601.2b, 601.2f: the optional additional cost "reveal a [filter] card from your hand" was paid for this spell ("you revealed a Dragon card"). Fields: `filter?`: ObjectFilter — Which objects (ObjectFilter; set fields AND together). - `playerHas` — Player designations; completedDungeon checks completion at least once this game (CR 309.7, 701.49). 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`); `designation`: "monarch" | "initiative" | "cityBlessing" | "maxSpeed" | "enduringStory" | "completedDungeon" — A player designation: monarch, initiative, city's blessing, max speed, …. - `anyOpponent` — True if the condition holds for any opponent. Fields: `condition`: ConditionDef — A ConditionDef that must hold. - `anyPlayer` — CR 608.2h: true if the condition holds for some player of `who` (default every player) with "you" rebound to that player; `all` requires every one ("if a player controls more creatures than each other player"). 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`); `condition`: ConditionDef — A ConditionDef that must hold; `all?`: boolean — True: the condition must hold for every selected player, not just one. - `opponentComparison` — CR 109.5, 608.2h: compare this quantity evaluated for you against the same quantity for an opponent, or every opponent if each is true; never pool opponents' quantities. Fields: `value`: ValueDef — The value to store or compare; `op`: ">" | "<" | ">=" | "<=" | "==" — Comparison between your value and the opponent's; `each?`: boolean — Compare with each opponent individually rather than any one of them; `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 players compared against (default: your opponents); triggeringPlayer for "that player controls more lands than you"; `subject?`: "you" | "opponent" — Whose quantity is on the left of the comparison (default you); `difference?`: number — The gap compared: (subject's ? other side's) op difference; default 0 ("an opponent has at least 5 more life than you": subject opponent, op >=, difference 5). - `phase` — The current step/phase. beforeAttackers ends when the declare attackers step begins; combatBeforeBlockers is restricted to combat before the declare blockers step; combatAfterBlockers requires blockers to have been declared this combat (CR 500.1, 508.1, 509.1). beforeCombatDamage ("Cast this spell only before the combat damage step") is the beginning phase, precombat main phase or combat before the combat damage step, while no combat damage step has begun this turn (CR 510). Fields: `is`: "upkeep" | "draw" | "untap" | "precombatMain" | "postcombatMain" | "main" | "combat" | "beforeAttackers" | "combatBeforeBlockers" | "combatAfterBlockers" | "declareAttackers" | "declareBlockers" | "endOfCombat" | "endStep" | "firstCombat" | "firstCombatYourTurn" | "beforeCombatDamage" — The current phase or step. - `topCard` — The top card of the player's library matches the filter. 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`); `filter`: ObjectFilter — Which objects (ObjectFilter; set fields AND together). - `affectedMatches` — An object the previous effect of this resolution applied to (the back-reference behind target mode "affected") matches the filter: "If it's a land card, you may put it onto the battlefield" after "exile the top card of your library". `span` unions the previous N effects' selections. Fields: `filter`: ObjectFilter — Which objects (ObjectFilter; set fields AND together); `zone?`: "battlefield" | "hand" | "graveyard" | "library" | "exile" | "stack" | "command" — A zone name (battlefield, hand, graveyard, library, exile, stack, command); `span?`: number — How many preceding selections to union (default 1); `digSubset?`: "looked" | "picked" | "rest" — Read the cards of the enclosing `digTop`: `looked` (all looked at), `picked` (taken by a pick), `rest` (the remainder); `quantifier?`: "any" | "all" — any (default): at least one of the referenced objects matches; all: every one does and there is at least one ("if all cards revealed this way are creature cards"); `lastKnown?`: boolean — CR 608.2h: a referenced permanent that left the battlefield is tested with its last-known controller and counters ("If you controlled that permanent, draw a card"). - `sourceIs` — A state check on the source. Fields: `state`: "paired" | "attached" | "faceDown" | "token" | "blocked" | "blocking" | "enchanted" | "equipped" | "suspended" | "solved" | "transformed" | "ringBearer" — The state the source is in. - `objectMatches` — CR 109.2, 303.4, 301.5, 611.3: current characteristics and zone of this source or the permanent it enchants/equips; battlefield by default. Does not select targets. Fields: `object`: "source" | "host" — Which object is tested: the source or its host; `filter?`: ObjectFilter — Which objects (ObjectFilter; set fields AND together); `zone?`: "battlefield" | "hand" | "graveyard" | "library" | "exile" | "stack" | "command" — A zone name (battlefield, hand, graveyard, library, exile, stack, command). - `startingPlayer` — CR 103.1: you were the starting player of this game. No fields. - `completedDungeon` — CR 309.7: you have completed a dungeon this game. No fields. - `all` — Every condition holds ("if X and Y"). Fields: `conditions`: ConditionDef[] — The conditions combined. - `any` — At least one condition holds ("if X or Y"). Fields: `conditions`: ConditionDef[] — The conditions combined. - `not` — e.g. “it's not your turn”. Fields: `condition`: ConditionDef — A ConditionDef that must hold. ### Stock examples - `kicked` — Conditional Dismissal: “” → `{"kind":"kicked"}` - `bargained` — Bargain Witness: “When this creature enters, if it was bargained, you gain 3 life.” → `{"kind":"bargained"}` - `costPaidMatches` — Grab the Prize: “Draw two cards. If the discarded card wasn't a land card, Grab the Prize deals 2 damage to each opponent.” → `{"kind":"costPaidMatches","cost":"discard","noun":"card","filter":{"types":["Land"]}}` - `choseOption` — Seize the Spotlight: “Each opponent chooses fame or fortune. For each player who chose fame, gain control of a creature that player controls until end of turn. Untap those creatures and they gain haste until end of turn. For each player who chose fortune, you draw a card and create a Treasure token.” → `{"kind":"choseOption","option":"fame","who":"current"}` - `triggeringOtherInZone` — Snarlfang Vermin: “Whenever Snarlfang Vermin deals combat damage to a creature, if that creature is still on the battlefield, suspect that creature. It perpetually gains this ability.” → `{"kind":"triggeringOtherInZone","zone":"battlefield"}` - `triggeringMatches` — Mutant Observer: “” → `{"kind":"triggeringMatches","filter":{"subtypes":["Mutant"]}}` - `compare` — Humming-: “Whenever you attack with two or more creatures,” → `{"kind":"compare","a":{"kind":"count","filter":{"controller":"you","attacking":true}},"op":">=","b":2}` - `controls` — Lukamina, Moon Druid: “Wild Shape — Specialize {3}. Activate only if you control six or more lands.” → `{"kind":"controls","who":"you","filter":{"types":["Land"]},"min":6}` - `playerIs` — Heartwood Storyteller: “Whenever a player casts a noncreature spell, each of that player's opponents may draw a card.” → `{"kind":"playerIs","who":"triggeringPlayer","is":"opponent"}` - `isYourTurn` — Revealing Witness: “” → `{"kind":"isYourTurn"}` - `isDefendingPlayer` — Kazuul, Tyrant of the Cliffs: “Whenever a creature an opponent controls attacks, if you're the defending player, create a 3/3 red Ogre creature token unless that creature's controller pays {3}.” → `{"kind":"isDefendingPlayer"}` - `attackedThisStep` — Declared Defense: “Cast this spell only during the declare attackers step and only if you've been attacked this step.” → `{"kind":"attackedThisStep"}` - `fullParty` — Baldric Prevention: “As long as you have a full party, prevent all damage that would be dealt to equipped creature.” → `{"kind":"fullParty"}` - `sourceTapped` — Watchdog Fixture: “” → `{"kind":"sourceTapped"}` - `sourceAttacking` — Attack Casting Ban Study: “” → `{"kind":"sourceAttacking"}` - `sourceInZone` — Grave Watch: “At the beginning of your upkeep, if this card is in your graveyard, you gain 2 life.” → `{"kind":"sourceInZone","zone":"graveyard","owner":"you"}` - `resolutionOrdinal` — Resolution Watch: “Whenever a creature you control enters, you gain 1 life. If this is the second time this ability has resolved this turn, draw a card.” → `{"kind":"resolutionOrdinal","ordinal":2}` - `sourceThisTurn` — Combat Celebrant: “If this creature hasn't been exerted this turn, you may exert it as it attacks. When you do, untap all other creatures you control and after this phase, there is an additional combat phase.” → `{"kind":"sourceThisTurn","did":"exerted"}` - `sourceDealtDamage` — Karakyk Guardian: “This creature has hexproof as long as it hasn't dealt damage yet.” → `{"kind":"sourceDealtDamage"}` - `sourceAboveInGraveyard` — Death Spark: “At the beginning of your upkeep, if this card is in your graveyard with a creature card directly above it, you may pay {1}.” → `{"kind":"sourceAboveInGraveyard","filter":{"types":["Creature"]},"direct":true}` - `controlsSourcePlaneswalker` — Source Walker: “0: If you control the planeswalker this ability came from, draw a card.” → `{"kind":"controlsSourcePlaneswalker"}` - `castDuringYourTurn` — Iteration 53 Your-Turn: “” → `{"kind":"castDuringYourTurn"}` - `castAfterExile` — Iteration 53 Foretold: “” → `{"kind":"castAfterExile","designation":"foretold"}` - `castDuringOpponentTurn` — Cast Opponent: “If you cast it during an opponent's turn, draw a card.” → `{"kind":"castDuringOpponentTurn"}` - `castDuringMainPhase` — Sphinx's Insight: “Addendum — If you cast this spell during your main phase, you gain 2 life.” → `{"kind":"castDuringMainPhase"}` - `anotherSpellCastThisTurn` — Another Spell: “If you've cast another spell this turn, draw a card.” → `{"kind":"anotherSpellCastThisTurn"}` - `castOrdinal` — Second Spell: “If this is the second spell you've cast this turn, draw a card.” → `{"kind":"castOrdinal","ordinal":2}` - `castFrom` — Exile Insight: “” → `{"kind":"castFrom","zone":"exile"}` - `wasCast` — Cast Entry Watcher Study: “” → `{"kind":"wasCast","by":"you"}` - `castWith` — Escape Witness: “This creature escapes with two +1/+1 counters on it.” → `{"kind":"castWith","alternative":"escape"}` - `asCast` — Jaws of Stone: “Jaws of Stone deals X damage divided as you choose among any number of targets, where X is the number of Mountains you control as you cast this spell.” → `{"kind":"asCast","value":{"kind":"count","filter":{"subtypes":["Mountain"],"controller":"you"}}}` - `playerHas` — Spire Winder: “This creature gets +1/+1 as long as you have the city's blessing.” → `{"kind":"playerHas","who":"you","designation":"cityBlessing"}` - `anyOpponent` — Graveyard Condition Study: “” → `{"kind":"anyOpponent","condition":{"kind":"compare","a":{"kind":"count","zone":"graveyard","player":"you"},"op":">=","b":8}}` - `opponentComparison` — Okina Nightwatch: “As long as you have more cards in hand than each opponent, this creature gets +3/+3.” → `{"kind":"opponentComparison","value":{"kind":"handSize"},"op":">","each":true}` - `phase` — Mandate of Peace: “Cast this spell only during combat.” → `{"kind":"phase","is":"combat"}` - `affectedMatches` — Hydroblast: “• Counter target spell if it's red.” → `{"kind":"affectedMatches","filter":{"colors":["R"]}}` - `sourceIs` — Progenitor Mimic Witness: “” → `{"kind":"sourceIs","state":"token"}` - `objectMatches` — Legendfire Hammer: “Equipped creature gets +3/+0 as long as it's legendary.” → `{"kind":"objectMatches","object":"host","filter":{"supertypes":["Legendary"]}}` - `startingPlayer` — Cindercone Smite: “Cindercone Smite deals 2 damage to target creature. Then create a Treasure token if you weren't the starting player.” → `{"kind":"startingPlayer"}` - `completedDungeon` — Gloom Stalker: “As long as you've completed a dungeon, this creature has double strike.” → `{"kind":"completedDungeon"}` - `all` — Dream Prowler: “This creature can't be blocked as long as it's attacking alone.” → `{"kind":"all","conditions":[{"kind":"sourceAttacking"},{"kind":"compare","a":{"kind":"count","filter":{"types":["Creature"],"attacking":true}},"op":"==","b":1}]}` - `any` — Desperate Futurescribe: “At the beginning of combat on your turn, another target creature you control gets +1/+1 until end of turn. If you've scried or surveilled this turn, put a +1/+1 counter on that creature instead.” → `{"kind":"any","conditions":[{"kind":"compare","a":{"kind":"thisTurn","event":"scried","who":"you"},"op":">=","b":1},{"kind":"compare","a":{"kind":"thisTurn","event":"surveilled","who":"you"},"op":">=","b":1}]}` - `not` — Combat Celebrant: “If this creature hasn't been exerted this turn, you may exert it as it attacks. When you do, untap all other creatures you control and after this phase, there is an additional combat phase.” → `{"kind":"not","condition":{"kind":"sourceThisTurn","did":"exerted"}}`