# Drawstep engine · Effects · `castFree` > Cast free — Cast or play the target card without paying its mana cost, immediately during resolution (CR 608.2g). 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#castFree ## Where it goes One step of an ability's `effects[]` (a spell's, a trigger's, an activated ability's, a mode's): `{ "effect": "castFree", … }`. Steps resolve in order. ## Fields | Field | Type | Required | Description | |---|---|---|---| | `target` | `TargetDef` | yes | What it acts on (TargetDef) | | `anyOrder` | `boolean` | no | CR 608.2g: the player may cast any number of the selected cards in any order, choosing the next card after each cast | | `optional` | `boolean` | no | "You may": the player chooses whether to do it | | `who` | `"you" \| "controller" \| "abilityController" \| "sourceController" \| "owner" \| "eachOpponent" \| "eachPlayer" \| "target" \| "triggeringPlayer" \| "defendingPlayer" \| "attackingPlayer" \| "activePlayer" \| "re …` | no | CR 608.2g: the casting player (default: the effect's controller); `current` inside a per-player examination is that player — "they may cast that card without paying its mana cost" | | `play` | `boolean` | no | CR 701.18 / 305: play, including a legal land play, during resolution | | `payLife` | `ValueDef` | no | CR 118.9: "by paying life equal to its mana value rather than paying its mana cost" (Anrakyr the Traveller) — life paid instead of the mana cost, read per card with { kind: "affected", property: "manaValue" }; always offered as a choice | | `payCost` | `boolean` | no | CR 608.2g, 601.2f-h: cast during resolution paying its costs ("you may cast it"), skipped if they can't be paid | | `anyMana` | `"color" \| "type"` | no | CR 609.4b: with payCost — ", and mana of any type can be spent to cast that spell": spend mana as though it were mana of any color / any type to cast it (automatic and manual payment) | | `graveyardReplacement` | `"exile"` | no | CR 614.1a / 400.7g: exile this cast spell if it would enter a graveyard while on the stack | | `graveyardReplacementFilter` | `ObjectFilter` | no | CR 614.1a: with graveyardReplacement, only spells cast this way matching this filter are exiled instead ("If an instant or sorcery spell cast this way would be put into your graveyard, exile it instead"); others reach the graveyard normally | | `then` | `EffectDef[]` | no | CR 608.2g: resolve if at least one card was actually cast or played | | `else` | `EffectDef[]` | no | CR 608.2g: resolve if no card was cast or played, including declined and impossible casts | ## Minimal form ```json {"effect":"castFree","target":{"of":"object","mode":"chosen","filter":{"types":["Creature"]}},"graveyardReplacement":"exile"} ``` The engine reads that minimal form as: “cast target creature without paying its mana cost. If that spell would be put into a graveyard, exile it instead”. ## Stock examples - **Free Study** — “” ```json {"effect":"castFree","target":{"of":"object","mode":"affected"},"optional":true} ``` - **Guile** — “” ```json {"effect":"castFree","target":{"of":"object","mode":"replaced"},"optional":true,"play":true} ``` - **Gravecast Witness** — “” ```json {"effect":"castFree","target":{"of":"object","mode":"chosen","zone":"graveyard","filter":{"anyTypes":["Instant","Sorcery","Artifact"],"owner":"you"}},"optional":true,"graveyardReplacement":"exile"} ``` ## 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) - [Values](https://drawstep.xyz/wiki/mtg/values.md) — every number kind an `amount` accepts - [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