# Drawstep engine · Values · `doneThisWay` > Done this way — Number of successful earlier actions; filter uses action-time characteristics, including tokens (CR 609.3, 608.2h). 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/values#doneThisWay ## Where it goes A number: `{ "kind": "doneThisWay", … }` wherever a ValueDef is accepted (`amount`, `power`, `max`, `count` …); a plain integer is also a ValueDef. ## Fields | Field | Type | Required | Description | |---|---|---|---| | `of` | `"sacrificed" \| "milled" \| "destroyed" \| "exiled" \| "discarded" \| "returned" \| "putIntoLibrary" \| "tapped" \| "untapped" \| "damaged" \| "drawn" \| "revealed" \| "countersPlaced" \| "countersRemoved" \| "amas …` | yes | Which action of this resolution is counted (see `thisWay` actions) | | `filter` | `ObjectFilter` | no | Which objects (ObjectFilter; set fields AND together) | | `distinctOwners` | `boolean` | no | CR 400.3, 121.1, 608.2h: count each owner of the action-time cards once. For drawn cards this counts the players who actually drew, even if replacement effects changed the number drawn; for searched, the players who searched | | `by` | `"you" \| "controller" \| "abilityController" \| "sourceController" \| "owner" \| "eachOpponent" \| "eachPlayer" \| "target" \| "triggeringPlayer" \| "defendingPlayer" \| "attackingPlayer" \| "activePlayer" \| "re …` | no | CR 109.5, 608.2h: only actions these players performed — the searcher (searched), the card's owner (discarded / drawn / milled), the controller as it was sacrificed (sacrificed). In a player selector's where, you is each candidate: "each player who discarded a card this way", "each opponent who searched a library this way" | ## Minimal form ```json {"kind":"doneThisWay","of":"sacrificed"} ``` The engine reads that minimal form as: “the number of permanents sacrificed this way”. ## Stock examples - **Least Discard Study** — “” ```json {"kind":"doneThisWay","of":"discarded","filter":{"owner":"current"}} ``` - **Bounded Rummage** — “Discard up to two cards, then draw that many cards.” ```json {"kind":"doneThisWay","of":"discarded"} ``` - **Free Rummage** — “Discard any number of cards, then draw that many cards.” ```json {"kind":"doneThisWay","of":"discarded"} ``` ## Related - [Values](https://drawstep.xyz/wiki/mtg/values.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