# Drawstep engine wiki — Costs > Mana, tapping, sacrificing, life, counters and every other cost part. Engine: Magic: The Gathering (`mtg`). Page: https://drawstep.xyz/wiki/mtg/costs · Raw Markdown: https://drawstep.xyz/wiki/mtg/costs.md · Complete AI pack (every topic in one document, with the output contract and worked examples): https://drawstep.xyz/wiki/drawstep-mtg-ai-pack.md. This page is generated from Drawstep's card schema; field names and discriminators are exact. A card definition is one JSON object; anything the vocabulary cannot express goes verbatim into `unparsed` instead of being approximated. ## Costs (`CostDef`) Used by activated abilities (`cost`), `mayPay` / `unlessPays`, keyword abilities and `additionalCost`. Any combination of parts; an empty object is a free cost. | Field | Type | Required | Description | |---|---|---|---| | `oneOf` | `CostDef[]` | no | Announce one alternative payment for this cost (CR 118.9, 601.2b). Use this field alone; each branch is a complete cost | | `chooseX` | `{ min?: number; max?: ValueDef }` | no | CR 107.3b, 601.2b: bounds on announced X. Evaluate max before paying costs, independently of affordability | | `mana` | `string` | no | Mana cost string, e.g. {2}{R} | | `ownManaCost` | `boolean` | no | "Pay its mana cost" (CR 118.12, 202.3): the source's own mana cost, read as the payment is made; a source with no mana cost can't pay it (CR 118.6) | | `genericAmount` | `ValueDef` | no | Computed generic mana added to mana, fixed when a resolution-time cost is paid: "unless you pay {1} for each card in your hand" (CR 107.3, 608.2h) | | `tapSelf` | `boolean` | no | {T} | | `untapSelf` | `boolean` | no | {Q} | | `unattachSelf` | `boolean` | no | CR 701.3d, 118.11, 601.2h: unattach this permanent as payment; an unattached permanent cannot pay this cost | | `payLife` | `ValueDef` | no | Pay this much life; { kind: "var", name: "X" } for "pay X life" (X is announced as the spell is cast) | | `getPoison` | `ValueDef` | no | The payer gets this many poison counters as the payment: "Ward—Get five poison counters" (The Serpent Society; CR 702.21a, 118.11) | | `othersGainLife` | `{ amount: ValueDef; who: "anOpponent" \| "eachOtherPlayer"; perChoice?: number }` | no | CR 118.3, 118.9: other players gain life as payment — "you may have an opponent gain 3 life" (anOpponent: the payer chooses one), "have each other player gain 6 life" (eachOtherPlayer). perChoice: an opponent is chosen separately for each that much life (cumulative upkeep's "An opponent gains 1 life", CR 702.24a) | | `draw` | `ValueDef` | no | CR 121.1, 118.11, 702.24a: draw this many cards as payment ("Cumulative upkeep—Draw a card") | | `addMana` | `string` | no | CR 106.1, 118.11, 702.24a: add this mana to your mana pool as payment ("Cumulative upkeep—Add {R}") | | `opponentCreatesToken` | `{ token: object; count: ValueDef }` | no | CR 118.11, 111.1, 702.24a: an opponent the payer chooses creates this many tokens as payment ("Cumulative upkeep—Have an opponent create a 1/1 red Survivor creature token") | | `opponentCounter` | `{ counter: string; amount: ValueDef; perChoice?: number }` | no | CR 118.11, 122.1, 702.24a: put counters on a creature an opponent controls, chosen by the payer, as payment ("Cumulative upkeep—Put a +1/+1 counter on a creature an opponent controls") | | `damageFromSource` | `ValueDef` | no | CR 118.12, 120.3: punisher payment "unless its controller has ~ deal 6 damage to them" — the source (last known information) deals this much damage to the payer as the payment; always payable, done even if the damage is prevented | | `sacrificeSelf` | `boolean` | no | Sacrifice the source ("Sacrifice ~") | | `sacrificeTogether` | `ObjectFilter[]` | no | CR 118.10, 601.2h: sacrifice one distinct controlled permanent for each filter, simultaneously; one Swamp Forest cannot pay both requirements | | `sacrifice` | `TargetDef` | no | Sacrifice another permanent matching this ("sacrifice X creatures": min / max = X) | | `returnToHand` | `TargetDef` | no | Return matching permanents you control to their owners' hands as a cost; selection does not target (CR 118.11, 601.2h) | | `discard` | `ValueDef` | no | Discard this many cards; { kind: "var", name: "X" } for "discard X cards" | | `discardRandom` | `boolean` | no | Discard the required cards at random as a cost (CR 701.9b, 118.11) | | `reveal` | `ObjectFilter` | no | Reveal one matching card from your hand as a cost; it remains in hand (CR 701.20a, 118.11) | | `revealCards` | `{ filter?: ObjectFilter; count: ValueDef; sharesColor?: boolean }` | no | Reveal this many matching cards from your hand as a cost; they remain in hand (CR 701.20a, 118.11, 601.2h). "Reveal X blue cards from your hand" (count X); "Reveal two cards from your hand that share a color" (sharesColor) | | `discardHand` | `boolean` | no | Discard your hand | | `discardSelf` | `boolean` | no | Discard this card (transmute) | | `addCountersSelf` | `{ counter: string; amount: ValueDef }` | no | CR 118.11, 122.1, 601.2h: put counters on this permanent to pay a cost; apply counter replacement effects | | `removeCounters` | `{ counter?: string; amount: ValueDef; from?: ObjectFilter; anyNumber?: boolean }` | no | Remove counters as payment without targeting; omitted counter permits any kinds, from distributes among controlled permanents (CR 122.1, 601.2h) | | `mill` | `ValueDef` | no | Mill this many cards as payment; requires enough cards in the library (CR 701.17, 601.2h) | | `exertSelf` | `boolean` | no | Exert the source as a cost; skip the exerting player's next untap step (CR 701.43) | | `revealSelf` | `boolean` | no | Reveal this card from hand as a cost (CR 701.20, 602.2a) | | `revealChoice` | `boolean \| string` | no | CR 101.4, 607.2d: "Reveal the player you chose:" — reveal the value secretly chosen for this source; payable only while that secret choice is recorded. true reveals the "player" key; a string names another choice key (Stalking Leonin, Guardian Archon) | | `tapOthers` | `{ filter?: ObjectFilter; count?: ValueDef; totalPower?: number; includeSelf?: boolean; anyNumber?: boolean }` | no | Tap matching untapped controlled permanents as payment (CR 118.11, 601.2h) | | `untapOthers` | `{ filter?: ObjectFilter; count: ValueDef }` | no | CR 118.11, 601.2h: choose this many tapped controlled permanents without targeting and untap them as payment. Untap replacement effects still apply | | `exileSelfFromGraveyard` | `boolean` | no | Exile the source from your graveyard (abilities activated from the graveyard) | | `exileGraveyard` | `boolean` | no | CR 118.12, 406.1: exile every card in the payer's graveyard ("unless its controller exiles all cards from their graveyard"); payable even when it is empty | | `exileTop` | `ValueDef` | no | CR 401.2, 118.12: exile this many cards from the top of your library as payment ("Exile the top card of your library: …"); payable only with that many cards in the library | | `payCounters` | `{ counter: string; amount: ValueDef }` | no | Pay player counters: "Pay {E}{E}" → counter "energy", amount 2 | | `exileOthers` | `{ filter?: ObjectFilter; zones: ("battlefield" \| "hand" \| "graveyard" \| "library" \| "exile" \| "stack" \| "command")[]; includeSelf?: boolean; count?: ValueDef; anyNumber?: boolean; totalManaValue?: number; shareCardType?: boolean; minDistinctTypes?: number; topmost?: boolean }` | no | Exile other cards from the zones (escape, craft, "exile a card from your hand", "exile X cards from your graveyard": count = X) | | `moveCards` | `{ from: "graveyard" \| "hand"; to: "hand" \| "library"; position?: "top" \| "bottom"; filter?: ObjectFilter; count?: number }` | no | CR 118.12, 400.1: move cards you own between your zones as a payment — "return a basic land card from your graveyard to your hand", "put a card from your graveyard on the bottom of your library" (count default 1; the payer chooses, and orders several going to the library) | | `exileSelf` | `boolean` | no | Exile this object from wherever it is ("Exile ~: …") | | `collectEvidence` | `ValueDef` | no | Collect evidence N: exile cards with total mana value N+ from your graveyard | | `forage` | `boolean` | no | Forage: exile three cards from your graveyard or sacrifice a Food | | `behold` | `string` | no | Behold a : choose one you control or reveal one from your hand | | `returnUnblockedAttacker` | `boolean` | no | Return an unblocked attacker you control to hand (ninjutsu) | | `discardMatching` | `ObjectFilter` | no | Discard a card matching the filter (retrace: a land card) | | `linkedToGraveyard` | `ObjectFilter` | no | CR 607.2a, 602.2b: put a card exiled with the source that matches this filter into its owner's graveyard ({} = any such card): "Put a creature card exiled with Shelob into its owner's graveyard:" is { types: ["Creature"] } | | `blight` | `ValueDef` | no | Put N -1/-1 counters on a creature you control | | `waterbend` | `boolean` | no | Waterbend: artifacts and creatures you control may be tapped to pay {1} each of the mana | | `xManaColor` | `"W" \| "U" \| "B" \| "R" \| "G"` | no | CR 107.3: "Spend only black mana on X" — each {X} in `mana` is paid with mana of this colour | | `manaColor` | `"W" \| "U" \| "B" \| "R" \| "G" \| "chosen"` | no | CR 106.6, 602.2b: "Spend only mana of the chosen color to activate this ability" — all mana spent on this cost (generic and increases included) must be of this colour; chosen = the source's chosen colour | ### Stock examples - `oneOf` — Either Offering: “” → `{"oneOf":[{"sacrifice":{"of":"object","mode":"chosen","filter":{"types":["Creature"]}}},{"discard":1}]}` - `chooseX` — Positive Counter Witness: “” → `{"chooseX":{"min":1},"removeCounters":{"counter":"charge","amount":{"kind":"var","name":"X"},"anyNumber":true}}` - `mana` — Native Cycling Study: “” → `{"mana":"{1}"}` - `ownManaCost` — Disruption Aura: “Enchanted artifact has "At the beginning of your upkeep, sacrifice this artifact unless you pay its mana cost."” → `{"ownManaCost":true}` - `genericAmount` — Tomakul Phoenix: “At the beginning of combat on your turn, you may pay {X}{R}, where X is Tomakul Phoenix's power. If you do, return it from your graveyard to the battlefield.” → `{"mana":"{R}","genericAmount":{"kind":"sourcePower"}}` - `tapSelf` — Mana Rock Study: “” → `{"tapSelf":true}` - `untapSelf` — Gilder Bairn: “” → `{"mana":"{2}{G/U}","untapSelf":true}` - `unattachSelf` — Unbinding Rod: “Unattach this Equipment: Draw a card.” → `{"unattachSelf":true}` - `payLife` — Life Ward: “” → `{"payLife":2}` - `getPoison` — The Serpent Society: “Whenever another creature you control with deathtouch dies, each opponent sacrifices a nontoken creature of their choice.” → `{"getPoison":5}` - `othersGainLife` — Wall of Shards: “Cumulative upkeep—An opponent gains 1 life.” → `{"othersGainLife":{"amount":1,"who":"anOpponent"}}` - `draw` — Psychic Vortex: “Cumulative upkeep—Draw a card.” → `{"draw":1}` - `opponentCreatesToken` — Varchild's War-Riders: “Cumulative upkeep—Have an opponent create a 1/1 red Survivor creature token.” → `{"opponentCreatesToken":{"token":{"name":"Survivor","types":["Creature"],"subtypes":["Survivor"],"colors":["R"],"power":1,"toughness":1},"count":1}}` - `opponentCounter` — Sheltering Ancient: “Cumulative upkeep—Put a +1/+1 counter on a creature an opponent controls.” → `{"opponentCounter":{"counter":"+1/+1","amount":1}}` - `damageFromSource` — Lava Blister: “Destroy target nonbasic land unless its controller has Lava Blister deal 6 damage to them.” → `{"damageFromSource":6}` - `sacrificeSelf` — Token-Map Study: “Create a Map token.” → `{"mana":"{1}","tapSelf":true,"sacrificeSelf":true}` - `sacrificeTogether` — Jarad, Golgari Lich Lord: “Sacrifice a Swamp and a Forest: Return this card from your graveyard to your hand.” → `{"sacrificeTogether":[{"subtypes":["Swamp"]},{"subtypes":["Forest"]}]}` - `sacrifice` — Thunderclap: “” → `{"sacrifice":{"of":"object","mode":"chosen","filter":{"subtypes":["Mountain"],"controller":"you"}}}` - `returnToHand` — Land Return Witness: “” → `{"mana":"{1}","returnToHand":{"of":"object","mode":"choose","filter":{"types":["Land"],"controller":"you"}}}` - `discard` — Discard Ward: “” → `{"discard":1}` - `discardRandom` — Random Payment: “” → `{"discard":1,"discardRandom":true}` - `reveal` — Revealed Payment: “” → `{"reveal":{"types":["Creature"]}}` - `revealCards` — Martyr of Ashes: “{2}, Reveal X red cards from your hand, Sacrifice this creature: This creature deals X damage to each creature without flying.” → `{"chooseX":{"min":0},"mana":"{2}","sacrificeSelf":true,"revealCards":{"filter":{"colors":["R"]},"count":{"kind":"var","name":"X"}}}` - `discardHand` — Lion's Eye Diamond: “Discard your hand, Sacrifice this artifact: Add three mana of any one color. Activate only as an instant.” → `{"sacrificeSelf":true,"discardHand":true}` - `discardSelf` — Mnemonic Sphere: “Channel — {U}, Discard this card: Draw a card.” → `{"mana":"{U}","discardSelf":true}` - `addCountersSelf` — Wall of Roots: “Put a -0/-1 counter on this creature: Add {G}. Activate only once each turn.” → `{"addCountersSelf":{"counter":"-0/-1","amount":1}}` - `removeCounters` — Distributed Counter Witness: “” → `{"mana":"{1}","removeCounters":{"counter":"+1/+1","amount":2,"from":{"types":["Creature"],"controller":"you"}}}` - `mill` — Deranged Assistant: “{T}, Mill a card: Add {C}.” → `{"tapSelf":true,"mill":1}` - `exertSelf` — Steward of Solidarity: “{T}, Exert this creature: Create a 1/1 white Warrior creature token with vigilance.” → `{"tapSelf":true,"exertSelf":true}` - `revealSelf` — Revealing Witness: “” → `{"revealSelf":true}` - `revealChoice` — Guardian Archon: “Reveal the player you chose: You and target permanent you control each gain protection from the chosen player until end of turn. Activate only once.” → `{"revealChoice":true}` - `tapOthers` — Tap Payment Witness: “” → `{"tapOthers":{"filter":{"types":["Artifact"]},"count":1,"includeSelf":true}}` - `untapOthers` — Crackleburr: “{U/R}{U/R}, {Q}, Untap two tapped blue creatures you control: Return target creature to its owner's hand.” → `{"mana":"{U/R}{U/R}","untapSelf":true,"untapOthers":{"filter":{"types":["Creature"],"colors":["U"]},"count":2}}` - `exileSelfFromGraveyard` — Sibsig's Artisan: “Renew — {1}{B}{B}, Exile this card from your graveyard: Put three +1/+1 counters on target creature you control. It perpetually gains this ability. Activate only as a sorcery.” → `{"mana":"{1}{B}{B}","exileSelfFromGraveyard":true}` - `exileGraveyard` — Grip of Amnesia: “Counter target spell unless its controller exiles all cards from their graveyard.” → `{"exileGraveyard":true}` - `exileTop` — Royal Herbalist: “{2}, Exile the top card of your library: You gain 1 life.” → `{"mana":"{2}","exileTop":1}` - `payCounters` — Energy Payment Witness: “” → `{"payCounters":{"counter":"energy","amount":{"kind":"var","name":"X"}}}` - `exileOthers` — Exile Payment Witness: “” → `{"exileOthers":{"filter":{"types":["Creature"]},"zones":["battlefield"],"includeSelf":true,"count":1}}` - `moveCards` — Harvest Wurm: “When this creature enters, sacrifice it unless you return a basic land card from your graveyard to your hand.” → `{"moveCards":{"from":"graveyard","to":"hand","filter":{"types":["Land"],"supertypes":["Basic"]}}}` - `exileSelf` — Elvish Spirit Guide: “Exile this card from your hand: Add {G}.” → `{"exileSelf":true}` - `forage` — Sacrifice Study: “” → `{"forage":true}` - `discardMatching` — Abolish: “” → `{"discardMatching":{"subtypes":["Plains"]}}` - `blight` — Lethal Sting: “As an additional cost to cast this spell, put a -1/-1 counter on a creature you control.” → `{"blight":1}` - `waterbend` — Ruthless Waterbender: “Waterbend {2}: This creature gets +1/+1 until end of turn. Activate only during your turn.” → `{"mana":"{2}","waterbend":true}` - `manaColor` — Throne of Eldraine: “{3}, {T}: Draw two cards. Spend only mana of the chosen color to activate this ability.” → `{"mana":"{3}","tapSelf":true,"manaColor":"chosen"}`