# Drawstep engine · Effects · `exchangeControl` > Exchange control — Exchange two permanents atomically; target may select exactly two, or second defaults to the source (CR 701.12a-b). 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#exchangeControl ## Where it goes One step of an ability's `effects[]` (a spell's, a trigger's, an activated ability's, a mode's): `{ "effect": "exchangeControl", … }`. Steps resolve in order. ## Fields | Field | Type | Required | Description | |---|---|---|---| | `target` | `TargetDef` | yes | What it acts on (TargetDef) | | `second` | `TargetDef` | no | The second object of the exchange (default the source) | ## Minimal form ```json {"effect":"exchangeControl","target":{"of":"object","mode":"chosen","filter":{"types":["Creature"]}}} ``` The engine reads that minimal form as: “exchange control of target creature and ~”. ## Stock examples - **Shifting Borders** — “Exchange control of two target lands.” ```json {"effect":"exchangeControl","target":{"of":"object","mode":"chosen","filter":{"types":["Land"]},"min":2,"max":2}} ``` - **Switcheroo** — “Exchange control of two target creatures.” ```json {"effect":"exchangeControl","target":{"of":"object","mode":"chosen","filter":{"types":["Creature"]},"min":2,"max":2}} ``` - **Switcheroo** — “Exchange control of two target creatures.” ```json {"effect":"exchangeControl","target":{"of":"object","mode":"chosen","filter":{"types":["Creature"],"controller":"you"}},"second":{"of":"object","mode":"chosen","filter":{"types":["Creature"],"controller":"opponent"}}} ``` ## 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