# Drawstep engine · Costs · `discardMatching` > Discard matching — Discard a card matching the filter (retrace: a land card). 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/costs#discardMatching ## Where it goes One part of a `cost` object (an activated ability's cost, `mayPay`, `unlessPays`, an `additionalCost`): `{ "discardMatching": … }`; parts combine freely. ## Fields | Field | Type | Required | Description | |---|---|---|---| | `discardMatching` | `ObjectFilter` | no | Discard a card matching the filter (retrace: a land card) | ## Stock examples - **Abolish** — “” ```json {"discardMatching":{"subtypes":["Plains"]}} ``` - **Volrath the Fallen** — “” ```json {"mana":"{1}{B}","discardMatching":{"types":["Creature"]}} ``` - **Hidden Horror** — “When this creature enters, sacrifice it unless you discard a creature card.” ```json {"discardMatching":{"types":["Creature"]}} ``` ## Related - [Costs](https://drawstep.xyz/wiki/mtg/costs.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