# Drawstep engine · Effects · `exchangeLifeWithStat` > Exchange life with stat — CR 701.12g, 613.4b: "exchange your life total with this creature's toughness" - the player's life becomes the object's previous power/toughness (gain or loss) and a layer-7b effect with no duration sets the stat to the previous life total; all or nothing (CR 701.12a): nothing happens if the object has left the battlefield or the life change is prohibited. 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#exchangeLifeWithStat ## Where it goes One step of an ability's `effects[]` (a spell's, a trigger's, an activated ability's, a mode's): `{ "effect": "exchangeLifeWithStat", … }`. Steps resolve in order. ## Fields | Field | Type | Required | Description | |---|---|---|---| | `who` | `"you" \| "controller" \| "abilityController" \| "sourceController" \| "owner" \| "eachOpponent" \| "eachPlayer" \| "target" \| "triggeringPlayer" \| "defendingPlayer" \| "attackingPlayer" \| "activePlayer" \| "re …` | no | Whose life total is exchanged; default you. "target opponent's life total" is "target" with a player target | | `target` | `PlayerTargetDef` | no | What it acts on (TargetDef) | | `object` | `TargetDef` | yes | The permanent whose power or toughness is exchanged (usually the source) | | `stat` | `"power" \| "toughness"` | yes | Which characteristic of the permanent is exchanged with the life total (CR 701.12a, 119.7-8) | ## Minimal form ```json {"effect":"exchangeLifeWithStat","object":{"of":"object","among":"triggering","random":true,"playerOwns":true,"playerFilter":"opponent","sharedBy":"creatureType","permanents":true},"stat":"power"} ``` The engine reads that minimal form as: “exchange your life total with target permanent chosen at random that share a creature type's power”. ## Stock examples - **Evra, Halcyon Witness** — “{4}: Exchange your life total with Evra's power.” ```json {"effect":"exchangeLifeWithStat","who":"you","object":{"of":"object","mode":"self"},"stat":"power"} ``` - **Tree of Redemption** — “{T}: Exchange your life total with this creature's toughness.” ```json {"effect":"exchangeLifeWithStat","who":"you","object":{"of":"object","mode":"self"},"stat":"toughness"} ``` - **Tree of Perdition** — “{T}: Exchange target opponent's life total with this creature's toughness.” ```json {"effect":"exchangeLifeWithStat","who":"target","target":{"of":"player","mode":"chosen","player":"eachOpponent"},"object":{"of":"object","mode":"self"},"stat":"toughness"} ``` ## 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 - [Start here](https://drawstep.xyz/wiki/mtg/start.md) — the rules, the output contract and the index of every primitive