# Drawstep engine · Effects · `restrict` > Restrict — A temporary rule restriction, combat requirement (CR 508.1d, 509.1c), or capacity increase of one (blockAdditional, CR 509.1a), independent of abilities (CR 611.2). Selected targets are fixed; object sets with mode all stay dynamic, including later entrants (CR 611.2c), and so do spell sets with mode all ("Spells you control can't be countered this turn" covers spells cast later this turn). assignsNoCombatDamage: the creature stays in combat but assigns no combat damage (CR 510.1). damageByToughness: it assigns combat damage equal to its toughness rather than its power (CR 510.1a; Bill the Pony) — over a mode-all set the rule follows whichever creatures currently match (CR 611.2c). Engine: Magic: The Gathering (`mtg`). This is one primitive of the Drawstep card vocabulary; field names and the discriminator are exact. Wiki page: https://drawstep.xyz/wiki/mtg/effects#restrict ## Where it goes One step of an ability's `effects[]` (a spell's, a trigger's, an activated ability's, a mode's): `{ "effect": "restrict", … }`. Steps resolve in order. ## Fields | Field | Type | Required | Description | |---|---|---|---| | `target` | `TargetDef` | yes | What it acts on (TargetDef) | | `planeswalkers` | `boolean` | no | CR 508.1c: cantAttack also forbids planeswalkers controlled by the defending players | | `restriction` | `"blockAdditional" \| "mustAttack" \| "mustBlock" \| "mustBeBlocked" \| "cantAttack" \| "cantBlock" \| "cantBeBlocked" \| "cantAttackOrBlock" \| "cantRegenerate" \| "cantBeTargeted" \| "cantBeCountered" \| "cantA …` | yes | Which restriction applies | | `duration` | `Duration \| "whileYouControlSource" \| "controllersNextTurnEnd"` | no | CR 611.2a-b: whileYouControlSource ends permanently when you lose control of the source incarnation; controllersNextTurnEnd applies only during the affected controller's next turn, fixed on resolution | | `onlySource` | `boolean` | no | For cantBlock, prevents blocking only the source object, whose identity is fixed now | | `by` | `ObjectFilter` | no | CR 509.1b: with cantBeBlocked, only blockers matching this filter (evaluated against the resolving ability) are forbidden. CR 115.1, 701.6: with cantBeTargeted / cantBeCountered, only spells / abilities whose source matches are restricted ("can't be the targets of blue or black spells": { colors: ["U", "B"] } with byKind spells) | | `byKind` | `"spells" \| "abilities" \| "spellsOrAbilities"` | no | CR 115.1, 701.6: with cantBeTargeted / cantBeCountered, restrict only spells, only abilities, or both (default) | | `exceptBy` | `ObjectFilter` | no | CR 509.1b: with cantBeBlocked, blockers matching this filter can still block. CR 508.1c: with cantAttack, attackers matching this filter can still attack ("Only land creatures can attack during that combat phase": { types: ["Creature", "Land"] }; "Only Throat Wolf can attack": { self: true }), the affected creatures that don't match can't | | `defending` | `"you" \| "controller" \| "abilityController" \| "sourceController" \| "owner" \| "eachOpponent" \| "eachPlayer" \| "target" \| "triggeringPlayer" \| "defendingPlayer" \| "attackingPlayer" \| "activePlayer" \| "re …` | no | CR 508.1c-d, 611.2c: with cantAttack, forbidden defending players; with mustAttack, the player each creature must attack if able, fixed on resolution — a selector ("attacks that player each combat if able": current in a forEachPlayer) or itsOwner (each creature's own owner: "attacks its owner this turn if able") | | `defendingTarget` | `PlayerTargetDef` | no | CR 508.1d, 601.2c: with mustAttack, a declared player target to attack if able ("target creature attacks target opponent this turn if able"); no requirement if it's no longer a legal target | | `defendingObject` | `TargetDef` | no | CR 508.1d: with mustAttack, the planeswalker or battle to attack if able, fixed on resolution ("attack Gideon Jura if able": {of: object, mode: self}); no requirement once it has left | | `turnOf` | `"you" \| "controller" \| "abilityController" \| "sourceController" \| "owner" \| "eachOpponent" \| "eachPlayer" \| "target" \| "triggeringPlayer" \| "defendingPlayer" \| "attackingPlayer" \| "activePlayer" \| "re …` | no | CR 611.2a: "During target player's next turn, …" — applies only during that player's next turn (fixed on resolution) and ends with it; omit duration. An object set with mode all stays dynamic during that turn | | `otherThan` | `"you" \| "controller" \| "abilityController" \| "sourceController" \| "owner" \| "eachOpponent" \| "eachPlayer" \| "target" \| "triggeringPlayer" \| "defendingPlayer" \| "attackingPlayer" \| "activePlayer" \| "re …` | no | CR 508.1d: with mustAttack, "… and attacks a player other than you if able" (the requirement goad imposes, CR 701.15b, without goading): the players to attack someone other than, fixed on resolution. A creature able to attack only those players or planeswalkers still attacks | | `unlessPays` | `CostDef` | no | CR 508.1g-i, 509.1d-f, 611.2: with cantAttack / cantBlock, a cost to attack / block for the duration instead of a ban ("Until your next turn, creatures can't attack you unless their controller pays {2} for each of those creatures": defending you, planeswalkers; "This turn, creatures can't block unless their controller pays {X} for each blocking creature they control"). mana / payLife / genericAmount (fixed on resolution, X included) for each affected attacker of a defending player (any without defending) or blocker | | `perCreatureText` | `"those"` | no | CR 508.1d, 509.1d: render the per-creature payment as "for each of those creatures"; no rules difference | ## Minimal form ```json {"effect":"restrict","target":{"of":"object","mode":"chosen","filter":{"types":["Creature"]}},"restriction":"blockAdditional","perCreatureText":"those"} ``` The engine reads that minimal form as: “target creature can block an additional creature this turn”. ## Stock examples - **Grant Conjunction Study** — “” ```json {"effect":"restrict","target":{"of":"object","mode":"affected"},"restriction":"cantBeBlocked","duration":"endOfTurn"} ``` - **Loyalty Silence Study** — “” ```json {"effect":"restrict","target":{"of":"object","mode":"all","filter":{"types":["Planeswalker"],"controller":"opponent"}},"restriction":"cantActivateLoyalty","duration":"endOfTurn"} ``` - **Heckling Fiends** — “” ```json {"effect":"restrict","target":{"of":"object","mode":"chosen","filter":{"types":["Creature"]}},"restriction":"mustAttack","duration":"endOfTurn"} ``` ## Related - [Effects](https://drawstep.xyz/wiki/mtg/effects.md) — the whole topic - [Filters & targets](https://drawstep.xyz/wiki/mtg/targets.md) — how `target` / `filter` select objects and players (selection algebra) - [Start here](https://drawstep.xyz/wiki/mtg/start.md) — the rules, the output contract and the index of every primitive