# Drawstep engine · Effects · `unlessPays` > Unless pays — Each affected player may pay the cost; for each who doesn't, `then` runs with that player as "you". 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#unlessPays ## Where it goes One step of an ability's `effects[]` (a spell's, a trigger's, an activated ability's, a mode's): `{ "effect": "unlessPays", … }`. Steps resolve in order. Printed words that point here (search aliases): unless pays. ## Fields | Field | Type | Required | Description | |---|---|---|---| | `who` | `"you" \| "controller" \| "abilityController" \| "sourceController" \| "owner" \| "eachOpponent" \| "eachPlayer" \| "target" \| "triggeringPlayer" \| "defendingPlayer" \| "attackingPlayer" \| "activePlayer" \| "re …` | no | Which player(s) — a player selector (default `you`) | | `target` | `TargetDef` | no | What it acts on (TargetDef) | | `cost` | `CostDef` | yes | The cost (CostDef) | | `then` | `EffectDef[]` | yes | Effects that follow ("then …", "if you do …") | | `prompt` | `string` | no | Prompt text shown to the deciding player | ## Minimal form ```json {"effect":"unlessPays","cost":{"mana":"{1}"},"then":[]} ``` The engine reads that minimal form as: “ unless you pay {1}”. ## Stock examples - **Skullscorch** — “Target player discards two cards at random unless that player has Skullscorch deal 4 damage to them.” ```json {"effect":"unlessPays","who":"target","target":{"of":"player","mode":"chosen"},"cost":{"damageFromSource":4},"then":[{"effect":"discard","who":"you","amount":2,"random":true}]} ``` - **Tomb of Annihilation** — “Trapped Entry — Each player loses 1 life. Veils of Fear — Each player loses 2 life unless they discard a card. Oubliette — Discard a card and sacrifice an artifact, a creature, and a land. Sandfall Cell — Each player loses 2 life unless they sacrifice a creature, artifact, or land. Cradle of the Death God — Create a 4/4 black Zombie God with deathtouch.” ```json {"effect":"unlessPays","who":"eachPlayer","cost":{"discard":1},"then":[{"effect":"loseLife","who":"you","amount":2}],"prompt":"Veils of Fear: discard a card? (Otherwise you lose 2 life.)"} ``` ## 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) - [Effects](https://drawstep.xyz/wiki/mtg/effects.md) — the steps a nested `effects` / `then` list may contain - [Start here](https://drawstep.xyz/wiki/mtg/start.md) — the rules, the output contract and the index of every primitive