enjine 0.6.3 → 0.6.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +67 -1
  3. data/SUPPORTED.md +10 -9
  4. data/docs/guides/api.md +3 -0
  5. data/docs/guides/card-data-format.md +41 -2
  6. data/docs/plans/dsl-gaps.md +12 -12
  7. data/docs/reference/abilities.md +25 -11
  8. data/docs/reference/decisions.md +1 -1
  9. data/docs/reference/effects.md +15 -11
  10. data/lib/enjine/actions/activate_mana_ability.rb +3 -2
  11. data/lib/enjine/cli/text.rb +2 -1
  12. data/lib/enjine/decisions/casting.rb +1 -1
  13. data/lib/enjine/engine/casting/casting.rb +1 -0
  14. data/lib/enjine/engine/casting/payment.rb +20 -13
  15. data/lib/enjine/engine/casting/permissions.rb +11 -9
  16. data/lib/enjine/engine/copies.rb +8 -0
  17. data/lib/enjine/engine/damage.rb +1 -0
  18. data/lib/enjine/engine/mana_helpers.rb +75 -0
  19. data/lib/enjine/engine/mana_sources.rb +19 -8
  20. data/lib/enjine/engine/options_memo.rb +15 -2
  21. data/lib/enjine/engine/turn_history.rb +8 -0
  22. data/lib/enjine/engine/zones.rb +10 -0
  23. data/lib/enjine/mechanics/abilities/cost_changes.rb +62 -17
  24. data/lib/enjine/mechanics/abilities/entering_copy.rb +45 -16
  25. data/lib/enjine/mechanics/abilities/mana_ability.rb +54 -9
  26. data/lib/enjine/mechanics/abilities/play_permissions.rb +28 -9
  27. data/lib/enjine/mechanics/abilities/replacement_effects.rb +40 -11
  28. data/lib/enjine/mechanics/card_spec.rb +28 -2
  29. data/lib/enjine/mechanics/effects/choose_cards.rb +30 -15
  30. data/lib/enjine/mechanics/effects/counter_spell.rb +12 -5
  31. data/lib/enjine/mechanics/effects/damage.rb +24 -4
  32. data/lib/enjine/mechanics/effects/delayed_triggers.rb +3 -2
  33. data/lib/enjine/mechanics/effects/draw.rb +1 -1
  34. data/lib/enjine/mechanics/effects/loot.rb +1 -1
  35. data/lib/enjine/mechanics/effects/mana.rb +4 -1
  36. data/lib/enjine/mechanics/effects/pay.rb +14 -8
  37. data/lib/enjine/mechanics/keywords/alternative_costs.rb +3 -2
  38. data/lib/enjine/mechanics/keywords/bargain.rb +39 -0
  39. data/lib/enjine/mechanics/selector.rb +29 -8
  40. data/lib/enjine/replacements.rb +23 -5
  41. data/lib/enjine/steps.rb +1 -1
  42. data/lib/enjine/version.rb +1 -1
  43. metadata +4 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 853cd6e6c1fa6e8ea3038049debaa947f18b6c948c595d3e546604c8a3dbc865
4
- data.tar.gz: 87ae58e7c4561df98afa3a6924214e0c3bbfd1fd30fa2242be66656fdac9d019
3
+ metadata.gz: 3012cc845c2796a139ce071514d69a5bfefeb10452b9c532645231e1b6028a24
4
+ data.tar.gz: e47ea9aa052adbe4df596909bb0970f828aa20a306b6cf5aebf74d30d0aae6ea
5
5
  SHA512:
6
- metadata.gz: c39a7f897e7c56df2a8939af69de53453751711520f005ded7f5c94d669d08e1bddc5a51c37b35a99c02316f64feb0ced04e6dfbbea74f84ceab4d2b8852af4a
7
- data.tar.gz: 698779f724842481530bd5f474e3fbaa316c3cbdcef0aceb0e58e59b1a88c975021fa220660e89f1c1f8768a5fd4ab33aa083c0c01a0ab08edcf668095e9954f
6
+ metadata.gz: 0aee99ee4cf6d951533bf903b211cc4fc7caf2db52701a63295f4d8518ef15b6320fe58cbd70833a0775ee3e092cea7452035f66bbb57a3dcb9ca72d116189ea
7
+ data.tar.gz: 41fb58dfc13a72d73dd735bdd028cc61bfe755794216599b8bf22bb53f4cb4831b92401e35f5a1816850b7088b7c0b245434248d44262fc1c804b55f6b6976e0
data/CHANGELOG.md CHANGED
@@ -8,6 +8,70 @@ change the public API; the stable surface is described in
8
8
 
9
9
  ## [Unreleased]
10
10
 
11
+ ## [0.6.5] - 2026-12-05
12
+
13
+ ### Added
14
+ - `spend_only` reads the creature type chosen for the mana's source (`"subtypes": "chosen"` in its card spec), fixed as
15
+ the mana is made so pool mana keeps it after the source leaves (CR 607.2d, 106.6), and takes `"cant_be_countered":
16
+ true`: a spell cast with that mana can't be countered (CR 101.2; the spell remembers it, a copy doesn't). Cavern of
17
+ Souls is `{"mana": {"cost": ["tap"], "color": "any_one", "spend_only": {"spells": {"types": ["creature"], "subtypes":
18
+ "chosen"}, "cant_be_countered": true}}}` with `{"choose_creature_type": {}}`.
19
+ - The `each` selector's `controller` takes `{"target": n}`, a targeted player: "put a +1/+1 counter on each creature
20
+ target player controls" is `{"each": "creature", "controller": {"target": 0}}` (nothing if that player is an illegal
21
+ target, CR 608.2b). Practiced Offense.
22
+ - `choose_cards` `from` takes a `library` zone, and several zones at once as one choice (`{"graveyard": P, "hand": P,
23
+ "library": P}`, "search its owner's graveyard, hand, and library", CR 701.23a); its amount (`{"this_way": n}`) is how
24
+ many of the chosen cards came from a hand. Card specs take `{"same_name_as": {"result": n}}`: the name of a card an
25
+ earlier effect moved (CR 201.2). Deadly Cover-Up's "exile a card from an opponent's graveyard. Then search its
26
+ owner's graveyard, hand, and library for any number of cards with that name and exile them. That player shuffles,
27
+ then draws a card for each card exiled from their hand this way" plays as printed.
28
+ - A mana ability's cost may include `tap_permanents` (count 1): "{T}, Tap an untapped creature you control: Add one
29
+ mana of any color" (Springleaf Drum: `{"mana": {"cost": ["tap", {"tap_permanents": {"filter": "creature"}}], "color":
30
+ "any_one"}}`; Gene Pollinator taps any `"permanent"`). The permanent to tap is part of the activation, since a mana
31
+ ability is paid for at once (CR 605.3a, 602.2b): each `activate_mana` option names it with `tap: id` (one option per
32
+ permanent and mana choice; permanents that make no mana are listed first). It needn't be untapped since the turn began
33
+ (CR 302.6), the source can't tap itself for both costs (CR 601.2h), a permanent the spell or ability being paid for
34
+ still needs can't be tapped for it, and tapping it is rewound with the payment (CR 734.1). Affordability counts each
35
+ permanent once: tapping a land for the cost only changes the color of its mana.
36
+ - `cost_modifier` takes `first: "each_turn" | "each_of_your_turns"`: only the first matching spell its caster casts
37
+ each turn (or during each of their turns) is changed; spells cast earlier that turn count even if the permanent wasn't
38
+ there yet, and a cancelled cast never counts (CR 601.2f, 601.2i). Its `spells` also take `keywords` and `not_subtypes`.
39
+ Momo, Friendly Flier is `{"cost_modifier": {"spells": {"any_of": ["creature"], "keywords": ["flying"], "not_subtypes":
40
+ ["lemur"]}, "reduce": 1, "first": "each_of_your_turns"}}`. The turn log keeps each spell's types, subtypes, keywords
41
+ and colors as cast (`"spells_as_cast"`), so a changeling is a Lemur spell and the face cast is the one matched.
42
+ - Bargain (CR 702.166a-c): `"bargain"` in `abilities`, an optional additional cost (sacrifice an artifact, enchantment
43
+ or token) announced like kicker (`choose_kicker`, then `choose_cost`); the spell isn't kicked. `{"cast_with":
44
+ "bargain"}` holds if it was bargained.
45
+ - `deal_damage` takes `"exile_if_dies": true`: "if a permanent dealt damage this way would die this turn, exile it
46
+ instead" applies only to the permanents actually dealt damage (after prevention and redirection), until end of turn
47
+ (CR 614.1a, 700.4). Torch the Tower is `"bargain"` plus `{"deal_damage": {"amount": 2, "to": {"target": 0},
48
+ "exile_if_dies": true, "if": {"not": {"cast_with": "bargain"}}}}`, the same with 3 if bargained, and `{"scry":
49
+ {"amount": 1, "if": {"cast_with": "bargain"}}}`.
50
+
51
+ ## [0.6.4] - 2026-12-04
52
+
53
+ ### Added
54
+ - `enter_as_copy` may copy a card in a graveyard: `of` takes a `graveyard_card` filter ("you may have this creature
55
+ enter as a copy of any creature card in a graveyard", CR 707.2, 614.1c), with the same `except` exceptions (CR
56
+ 707.9b), and takes `then`, effects run once it has entered as a copy: a `reflexive_trigger` for "When you do, exile
57
+ that card" (CR 603.12), where `{"triggering": "object"}` is the copied object. `{"enter_as_copy": {"of":
58
+ {"graveyard_card": {"any_of": ["creature"]}}, "except": {"name": "Superior Spider-Man", "power": 4, "toughness": 4,
59
+ "subtypes": ["spider", "human", "hero"]}, "then": [{"reflexive_trigger": {"effects": [{"exile": {"to": {"triggering":
60
+ "object"}}}]}}]}}`. `with_counters` is rejected with a graveyard filter, and `of` must name permanents or graveyard cards.
61
+ - `play_permission` takes `zone: "graveyard"`: the referenced cards may be played from a graveyard (a milled card,
62
+ "mill a card. You may play that card this turn": `{"play_permission": {"to": {"result": 0}, "zone": "graveyard"}}`,
63
+ CR 601.3). A land played this way uses the land play (CR 305.2), and the permission ends at end of turn or once the card
64
+ leaves the graveyard (CR 400.7, 514.2). It can name a card in another player's graveyard. `while_exiled` is rejected with it.
65
+ - `draw_replacement` takes `plus` (an amount) instead of `amount`: "if you would draw one or more cards, you draw that
66
+ many cards plus one instead" applies once to an instruction to draw, so "draw two" becomes three, not four
67
+ (CR 614.11, 121.2, 614.5). It also takes an `if` condition, checked as the draw would happen (CR 604.2): Quantum
68
+ Riddler is `{"draw_replacement": {"plus": 1, "if": {"hand_size": "you", "at_most": 1}}}`. With a per-card `amount`
69
+ effect too, the plus applies first, then each card is multiplied (the order used for life and counters, CR 616.1).
70
+ Draw effects, connive/recruit and the draw step now draw through one draw event (`Engine#draw_cards!`).
71
+ - `counter` and `counter_unless_pays` take `"exile_instead": true`: a spell countered this way is exiled instead of
72
+ being put into its owner's graveyard (CR 701.6a, 614.1a); if its controller pays, nothing is exiled. No More Lies is
73
+ `{"counter_unless_pays": {"mana": "{3}", "to": {"target": 0}, "exile_instead": true}}`.
74
+
11
75
  ## [0.6.3] - 2026-11-29
12
76
 
13
77
  ### Added
@@ -349,7 +413,9 @@ Includes 0.4.0, which was tagged but never published to RubyGems.
349
413
  - `enjine` CLI: hot-seat and random play, `--validate`, `--verify`,
350
414
  `--random-deck`, save and load.
351
415
 
352
- [Unreleased]: https://github.com/thisiscetin/enjine/compare/v0.6.3...HEAD
416
+ [Unreleased]: https://github.com/thisiscetin/enjine/compare/v0.6.5...HEAD
417
+ [0.6.5]: https://github.com/thisiscetin/enjine/compare/v0.6.4...v0.6.5
418
+ [0.6.4]: https://github.com/thisiscetin/enjine/compare/v0.6.3...v0.6.4
353
419
  [0.6.3]: https://github.com/thisiscetin/enjine/compare/v0.6.2...v0.6.3
354
420
  [0.6.2]: https://github.com/thisiscetin/enjine/compare/v0.6.1...v0.6.2
355
421
  [0.6.1]: https://github.com/thisiscetin/enjine/compare/v0.6.0...v0.6.1
data/SUPPORTED.md CHANGED
@@ -102,6 +102,7 @@ Rules version: Comprehensive Rules effective 2026-11-06.
102
102
  | [`additional_cost`](docs/reference/abilities.md#additional_cost) | 601.2b, 601.2f, 601.2h, 118.8, 118.8b, 601.3c | As an additional cost to cast this spell, pay `cost` too (mana and/or chosen costs such as `sacrifice_permanent`). The spell can't be cast without it. `optional: true`: you may pay it (announced with the `choose_kicker` decision); the condition `{"cast_with": "additional_cost"}` then holds (the spell isn't kicked). With `flash: true` (optional only) you may cast it from your hand as though it had flash if you pay it: cast that way, only paying it is offered. |
103
103
  | [`additional_land_plays`](docs/reference/abilities.md#additional_land_plays) | 305.2, 305.2a, 305.2b, 604.1 | Its controller may play an additional land on each of their turns. Each instance adds one land play (CR 305.2); lands put onto the battlefield by effects don't count. |
104
104
  | [`additional_triggers`](docs/reference/abilities.md#additional_triggers) | 603.2d, 119.9, 607.2d | While this permanent is on the battlefield, a triggered ability of a permanent its controller controls triggers an additional time if it triggers because of `cause` (you_gain_life: its controller gaining life) and/or its permanent matches `of` (a filter: "triggered abilities of Allies you control", {"creature": {"other": true, "subtypes": "chosen"}}). At least one of them. |
105
+ | [`bargain`](docs/reference/abilities.md#bargain) | 702.166a, 702.166b, 702.166c, 601.2b, 601.2h, 701.21a | Bargain: as you cast this spell you may sacrifice an artifact, enchantment or token (announced with the `choose_kicker` decision, the permanent chosen with `choose_cost`; the spell isn't kicked). `{"cast_with": "bargain"}` holds if it was bargained. |
105
106
  | [`beam_me_up`](docs/reference/abilities.md#beam_me_up) | 702.196a, 702.196b, 118.9, 601.2b, 601.2f, 601.2h | You may cast this instant or sorcery card from your graveyard for `cost` plus returning a creature you control to its owner's hand, instead of its mana cost. If you do, it's exiled whenever it would leave the stack. Offered as a cast option with `via: "beam:<ref>"`. |
106
107
  | [`can_block_only`](docs/reference/abilities.md#can_block_only) | 509.1b, 509.1a | This creature can block only attacking creatures matching `filter` (checked as blockers are declared, with their current characteristics; controller-relative filter keys are seen from this creature's controller). |
107
108
  | [`cant_be_blocked_by`](docs/reference/abilities.md#cant_be_blocked_by) | 509.1b, 509.1a | This creature can't be blocked by creatures matching `filter` (checked as blockers are declared, with their current characteristics). |
@@ -118,7 +119,7 @@ Rules version: Comprehensive Rules effective 2026-11-06.
118
119
  | [`choose_number`](docs/reference/abilities.md#choose_number) | 614.12, 614.12a, 607.2 | As this permanent enters, its controller chooses a number from `min` to `max`; abilities of it that say "the chosen number" use it. |
119
120
  | [`choose_option`](docs/reference/abilities.md#choose_option) | 614.12, 607.2f, 614.12b | As this permanent enters, its controller chooses one of the `options` (words with no rules meaning); a condition {"chosen": word} is true when that word was chosen. |
120
121
  | [`class_level`](docs/reference/abilities.md#class_level) | 717.2a, 717.2b, 717.2d, 717.3, 602.5d | A class level bar: `cost` (a mana cost string or a list of costs): this permanent's level becomes `level`; activate only if its level is `level` - 1, as a sorcery. While its level is `level` or greater it has `keywords` and `abilities`. A permanent without a level is level 1. |
121
- | [`cost_modifier`](docs/reference/abilities.md#cost_modifier) | 601.2f, 118.7a, 604.1, 601.2a | While on the battlefield: spells cast by `caster` (you, opponent or any; default you) whose card types match `spells` ({"any_of": [types], "not": [types]}, default all spells; `subtypes`, `colors` and `name` narrow it: "Dragon spells", "red spells"; `"subtypes": "chosen"`: of the type chosen for this permanent, `"name": "chosen"`: with the name its source chose) cost `reduce` less or `increase` more generic mana. `from` / `not_from`: only spells cast from (not from) that zone (hand | graveyard | exile | library | outside). |
122
+ | [`cost_modifier`](docs/reference/abilities.md#cost_modifier) | 601.2f, 118.7a, 604.1, 601.2a, 601.2i | While on the battlefield: spells cast by `caster` (you, opponent or any; default you) whose card types match `spells` ({"any_of": [types], "not": [types]}, default all spells; `subtypes`, `colors` and `name` narrow it: "Dragon spells", "red spells"; `"subtypes": "chosen"`: of the type chosen for this permanent, `"name": "chosen"`: with the name its source chose; `keywords` / `not_subtypes`: "non-Lemur creature spells with flying") cost `reduce` less or `increase` more generic mana. `from` / `not_from`: only spells cast from (not from) that zone (hand | graveyard | exile | library | outside). `first`: only the first matching spell its caster casts `each_turn` or `each_of_your_turns` (spells cast before this permanent was there count too). |
122
123
  | [`cost_reduction`](docs/reference/abilities.md#cost_reduction) | 601.2f, 118.7a, 702.41a | This spell costs `amount` generic mana less to cast, if the optional `if` condition holds when its total cost is determined (after targets are chosen). `amount` may be computed, e.g. {"count": {"each": "artifact", "controller": "you"}} for affinity for artifacts (CR 702.41a). It can't reduce colored mana or go below {0}. |
123
124
  | [`craft`](docs/reference/abilities.md#craft) | 702.167a, 702.167b, 702.167c, 712.11a, 602.2b, 406.1 | Craft with `materials` `cost`: pay `cost`, exile this permanent and exile the materials (`count` (default 1) permanents you control and/or cards in your graveyard matching the card spec `card`; `or_more: true`: that many or more), chosen with `choose_cost`: return this card to the battlefield transformed under its owner's control. Sorcery speed. The exiled materials are the selector "exiled_for_cost". |
124
125
  | [`crew`](docs/reference/abilities.md#crew) | 702.122a, 702.122b, 702.122e, 301.7, 301.7a, 301.7b, 208.3, 302.6 | Crew N: tap any number of other untapped creatures you control with total power N or more (chosen one at a time; `done` once the total is enough): this permanent becomes an artifact creature until end of turn. A Vehicle has its printed power and toughness only while it's a creature. |
@@ -130,9 +131,9 @@ Rules version: Comprehensive Rules effective 2026-11-06.
130
131
  | [`disguise`](docs/reference/abilities.md#disguise) | 702.168a, 702.168b, 702.168c, 702.168d, 708.2, 708.4, 708.8, 116.2b | Disguise: you may cast this card face down as a nameless colorless 2/2 creature spell with ward {2} by paying {3} rather than its mana cost (cast option `via: "alt:<ref>"`). Any time you have priority you may turn the face-down permanent face up by paying `cost` (special action `{type: "turn_face_up", via: "disguise"}`). |
131
132
  | [`double_counters`](docs/reference/abilities.md#double_counters) | 614.1a, 122.6, 122.6a, 616.1 | While this permanent is on the battlefield, if its controller would put one or more counters (only `counter`, if given) on a permanent matching `affects` ({"each": filter, "controller": you|opponent|any}, relative to this permanent's controller), the number put is doubled. This includes counters a permanent enters with. |
132
133
  | [`double_tokens`](docs/reference/abilities.md#double_tokens) | 614.1a, 614.5, 111.1, 616.1 | While this permanent is on the battlefield, if tokens would be created under its controller's control, twice that many of those tokens are created instead. Several apply one after another (two make four times as many). |
133
- | [`draw_replacement`](docs/reference/abilities.md#draw_replacement) | 614.11, 614.11a, 614.5, 121.2, 616.1 | While this permanent is on the battlefield, each time its controller would draw a card, they draw `amount` cards instead (even with an empty library). The draws it makes aren't replaced by it again, but another such effect applies to each of them. |
134
+ | [`draw_replacement`](docs/reference/abilities.md#draw_replacement) | 614.11, 614.11a, 614.5, 121.2, 616.1, 604.2 | While this permanent is on the battlefield (and its `if` condition holds as the draw would happen), each time its controller would draw: with `amount`, each card they would draw becomes `amount` cards (even with an empty library; the draws it makes aren't replaced by it again, but another such effect applies to each of them); with `plus`, an instruction to draw one or more cards draws that many plus `plus` instead, once for the whole instruction ("draw two" becomes three, not four). The affected player's best order is used: adding before multiplying each card. |
134
135
  | [`enchant`](docs/reference/abilities.md#enchant) | 702.5a, 115.1b, 303.4a | The Aura's enchant ability: a target filter for what its spell targets and what the Aura may be attached to, e.g. "creature" or {"permanent": {"any_of": ["artifact", "creature"]}}. Only Auras have it. |
135
- | [`enter_as_copy`](docs/reference/abilities.md#enter_as_copy) | 707.5, 707.9b, 205.1a, 614.1c, 614.12 | As this permanent enters, its controller may choose a permanent on the battlefield matching `of`; it enters as a copy of that permanent (its copiable values, with the `except` modifications) and its enter abilities trigger. `with_counters: true`: it also enters with the counters the copied permanent has. Choosing none: it enters as itself. |
136
+ | [`enter_as_copy`](docs/reference/abilities.md#enter_as_copy) | 707.5, 707.2, 707.9b, 205.1a, 614.1c, 614.12, 603.12 | As this permanent enters, its controller may choose a permanent on the battlefield matching `of` (or, with a `graveyard_card` filter, a card in a graveyard); it enters as a copy of it (its copiable values, with the `except` modifications) and its enter abilities trigger. `with_counters: true`: it also enters with the counters the copied permanent has. `then`: effects once it entered as a copy, usually a reflexive_trigger ("When you do, exile that card"), reading {"triggering": "object"} (what it copied) and "player" (its owner). Choosing none: it enters as itself. |
136
137
  | [`enters_attacking`](docs/reference/abilities.md#enters_attacking) | 614.1c, 508.4, 506.4 | While this permanent's controller controls an attacking creature, permanents matching `affects` enter the battlefield tapped and attacking (the defending player). They never "attacked", so attack triggers don't see them. |
137
138
  | [`enters_prepared`](docs/reference/abilities.md#enters_prepared) | 723.3a, 614.1c | This permanent enters the battlefield prepared (it needs a prepare spell, see `layout: "prepare"`). |
138
139
  | [`enters_tapped`](docs/reference/abilities.md#enters_tapped) | 614.1c, 614.12 | This permanent enters the battlefield tapped (a self-replacement effect). |
@@ -159,7 +160,7 @@ Rules version: Comprehensive Rules effective 2026-11-06.
159
160
  | [`life_gain_replacement`](docs/reference/abilities.md#life_gain_replacement) | 614.1a, 614.5, 616.1, 119.10 | While this permanent is on the battlefield, each time `player` (you (default) | opponent | any, relative to its controller) would gain life, instead: `multiply` (2 = "twice that much"), `plus` an amount ("that much life plus 1"), or `lose: true` ("that player loses that much life instead"). Each applies once to an event; the affected player's best order is used: losing instead first, then adding, then multiplying. Gaining 0 life is no event (nothing applies). |
160
161
  | [`look_at_top`](docs/reference/abilities.md#look_at_top) | 401.5, 604.1 | While this permanent is on the battlefield, its controller sees the top card of their library (the `library_top` of their view). |
161
162
  | [`loyalty`](docs/reference/abilities.md#loyalty) | 606.3, 606.4, 606.5, 602.2b | A loyalty ability. Its cost adds (positive) or removes (negative) loyalty counters and is paid on activation. Sorcery speed, and only one loyalty ability per planeswalker per turn. |
162
- | [`mana`](docs/reference/abilities.md#mana) | 605.1a, 605.3a, 605.3b, 106.1a, 106.4, 106.6, 607.2d, 602.5b, 122.1 | An activated mana ability: pay the cost, add the mana to your mana pool immediately. It does not use the stack and can be activated whenever you have priority. `produce`: the fixed mana (`amount` times). Or `color`: `amount` mana (default 1) of one color you choose as you activate it (`"any_one"`) or in any combination of colors (`"any"`); `colors` limits the choice. `"chosen"`: of the color chosen as this entered (choose_color). `spend_only` restricts how the mana can be spent. `only_if`: "Activate only if ...". `limit: "once_each_turn"`: "Activate only once each turn." `add_counters`: it also puts counters on its own source ("Add {C}. Put a point counter on this"). |
163
+ | [`mana`](docs/reference/abilities.md#mana) | 605.1a, 605.3a, 605.3b, 106.1a, 106.4, 106.6, 607.2d, 602.5b, 122.1, 101.2, 602.2b, 302.6 | An activated mana ability: pay the cost, add the mana to your mana pool immediately. It does not use the stack and can be activated whenever you have priority. `produce`: the fixed mana (`amount` times). Or `color`: `amount` mana (default 1) of one color you choose as you activate it (`"any_one"`) or in any combination of colors (`"any"`); `colors` limits the choice. `"chosen"`: of the color chosen as this entered (choose_color). `spend_only` restricts how the mana can be spent (a spec of `"subtypes": "chosen"`: the creature type chosen as this entered; `"cant_be_countered": true`: a spell cast with it can't be countered). `only_if`: "Activate only if ...". `limit: "once_each_turn"`: "Activate only once each turn." `add_counters`: it also puts counters on its own source ("Add {C}. Put a point counter on this"). A `tap_permanents` cost (count 1) taps another permanent you choose as you activate it ("{T}, Tap an untapped creature you control"): each activation option names it (`tap`). |
163
164
  | [`max_speed`](docs/reference/abilities.md#max_speed) | 702.178a, 702.178b, 702.179e, 113.6c | While your speed is 4 (max speed), this object has `keywords` and `abilities` (any kind: activated, triggered, static, mana; an ability with a graveyard cost works from your graveyard). |
164
165
  | [`may_not_untap`](docs/reference/abilities.md#may_not_untap) | 502.3, 604.1 | Its controller may choose not to untap it during their untap step (decision `untap_choice`, asked only while it's tapped). |
165
166
  | [`mayhem`](docs/reference/abilities.md#mayhem) | 702.187a, 702.187b, 702.187c, 118.9, 601.2b, 601.2f, 601.2h, 305.1 | Mayhem: as long as you discarded this card this turn, you may cast it from your graveyard by paying `cost` rather than its mana cost. Without `cost` (`"mayhem"`), you may play it from your graveyard (a land too) if you discarded it this turn. Cast option `via: "alt:<ref>"`. |
@@ -294,7 +295,7 @@ Rules version: Comprehensive Rules effective 2026-11-06.
294
295
  | [`change_target`](docs/reference/effects.md#change_target) | 115.7, 115.7a, 115.7e | Change the target(s) of each spell or ability on the stack `of` refers to: each target becomes another legal target you choose for that spell; if one can't, none change. |
295
296
  | [`choose_card_name`](docs/reference/effects.md#choose_card_name) | 201.4, 607.2d, 608.2c | The player (`to`, default you) chooses a card name among the cards in the game (`types`: the named card has one of these; `not`: it has none of these); "the chosen name" (`name: "chosen"` in filters) reads it. `remember: "source"`: the source permanent remembers it for its other abilities. |
296
297
  | [`choose_card_type`](docs/reference/effects.md#choose_card_type) | 205.2a, 607.2d, 608.2c | The player (`to`, default you) chooses a card type; later effects of this spell or ability read it with "types": "chosen". |
297
- | [`choose_cards`](docs/reference/effects.md#choose_cards) | 701.20a, 701.20e, 400.7j, 608.2c, 607.2a, 118.12, 701.9a, 701.9b, 608.2d | You choose `count` (default 1; "any": any number; "all": every matching card, no choice) cards matching `for` from `from`: a selector (e.g. {"result": 0}, the cards an earlier effect milled) or a player's zone, {"hand": selector} / {"graveyard": selector}. `optional`: you may choose fewer. Then they are put into `put` (`discard`: from a hand, its owner discards them; `tapped` onto the battlefield, under your control; exiled cards `link`ed to the source). `look`: you look at the whole zone first; `reveal`: "chosen" reveals what you chose, "all" the whole set. `then` runs if a card was chosen, `otherwise` if none was ("if you can't"). `random: true`: the cards are picked at random (the game's random number generator) instead of chosen. `chooser`: the player who chooses (a player selector, default "you"; e.g. "each_opponent" or {"target": 0}: "target opponent chooses a card from among them"); they look at the cards they choose from, and the cards still go where `put` says under your control. |
298
+ | [`choose_cards`](docs/reference/effects.md#choose_cards) | 701.20a, 701.20e, 400.7j, 608.2c, 607.2a, 118.12, 701.9a, 701.9b, 608.2d, 701.23a, 701.23b | You choose `count` (default 1; "any": any number; "all": every matching card, no choice) cards matching `for` from `from`: a selector (e.g. {"result": 0}, the cards an earlier effect milled) or a player's zone, {"hand": selector} / {"graveyard": selector} / {"library": selector}, or several of them ("search its owner's graveyard, hand, and library": one choice among them all). `optional`: you may choose fewer. Then they are put into `put` (`discard`: from a hand, its owner discards them; `tapped` onto the battlefield, under your control; exiled cards `link`ed to the source). `look`: you look at the whole zone first; `reveal`: "chosen" reveals what you chose, "all" the whole set. `then` runs if a card was chosen, `otherwise` if none was ("if you can't"). `random: true`: the cards are picked at random (the game's random number generator) instead of chosen. `chooser`: the player who chooses (a player selector, default "you"; e.g. "each_opponent" or {"target": 0}: "target opponent chooses a card from among them"); they look at the cards they choose from, and the cards still go where `put` says under your control. Its amount ({"this_way": n}) is how many of the cards came from a hand ("draws a card for each card exiled from their hand this way"). |
298
299
  | [`choose_color`](docs/reference/effects.md#choose_color) | 105.4, 607.2d, 608.2c | The player (`to`, default you) chooses a color; later effects of this spell or ability read it with "colors": "chosen". |
299
300
  | [`choose_creature_type`](docs/reference/effects.md#choose_creature_type) | 205.3m, 607.2d, 608.2c | The player (`to`, default you) chooses a creature type; later effects of this spell or ability read it with "subtypes": "chosen". |
300
301
  | [`choose_new_targets`](docs/reference/effects.md#choose_new_targets) | 115.7, 115.7d, 115.7e | You may choose new targets for each spell or ability on the stack `of` refers to (e.g. {"triggering": "object"}: "that spell"): for each target, keep it or pick another legal target for that spell. |
@@ -303,15 +304,15 @@ Rules version: Comprehensive Rules effective 2026-11-06.
303
304
  | [`connive`](docs/reference/effects.md#connive) | 701.50a, 701.50b, 701.50d, 701.50e | Each referenced permanent (default: this one) connives `amount` (default 1): its controller draws that many cards, then discards that many, then it gets a +1/+1 counter for each nonland card discarded. |
304
305
  | [`copy_card`](docs/reference/effects.md#copy_card) | 707.12, 707.12a, 707.10a, 704.5d | Create `amount` copies of each card `of` refers to ("self": the source card), in the zone that card is in, owned by you. They are the effect's result, e.g. for `cast_free` or `cast`. A card copy ceases to exist if it is anywhere but the stack or the battlefield (so one that isn't cast now is gone at the next state-based-action check). |
305
306
  | [`copy_spell`](docs/reference/effects.md#copy_spell) | 707.10, 707.10a, 707.10b, 707.10c, 707.10f, 608.3f | Copy each spell or ability on the stack `of` refers to ("self": the spell this ability or spell belongs to; a `stack_ability` target: an activated or triggered ability) `amount` times. The copies are put on the stack under the referenced player's control (default: you) with the same modes, X, kicker and targets; they aren't cast or activated, and an ability's copy has the same source. With `new_targets: true` the controller may choose new targets for each copy. A copy of a permanent spell becomes a token as it resolves. `except`: the copies have these differences (e.g. {"keywords": ["wither"]}: "the copy gains wither"). |
306
- | [`counter`](docs/reference/effects.md#counter) | 701.6a, 701.6b, 101.2 | Counter each referenced spell or ability: a spell leaves the stack for its owner's graveyard without resolving, an ability ceases to exist. A spell that can't be countered stays. |
307
+ | [`counter`](docs/reference/effects.md#counter) | 701.6a, 701.6b, 101.2, 614.1a | Counter each referenced spell or ability: a spell leaves the stack for its owner's graveyard (for exile with `exile_instead: true`) without resolving, an ability ceases to exist. A spell that can't be countered stays. |
307
308
  | [`counter_bonus`](docs/reference/effects.md#counter_bonus) | 614.1a, 614.16, 611.2a, 122.6, 616.1 | Until end of turn, whenever one or more counters would be put on a permanent the controller controls (including counters it enters with), that many plus `amount` of each of those kinds are put on it instead. |
308
- | [`counter_unless_pays`](docs/reference/effects.md#counter_unless_pays) | 701.6a, 118.12a, 605.3a, 701.67a | Counter each referenced spell or ability unless its controller pays `mana` (or `waterbend`s that cost, CR 701.67a, or pays the list of costs `cost`) as this resolves (they choose, and pay like any cost; mana abilities allowed). |
309
+ | [`counter_unless_pays`](docs/reference/effects.md#counter_unless_pays) | 701.6a, 118.12a, 605.3a, 701.67a, 608.2b, 614.1a | Counter each referenced spell or ability unless its controller pays `mana` (or `waterbend`s that cost, CR 701.67a, or pays the list of costs `cost`) as this resolves (they choose, and pay like any cost; mana abilities allowed). With `exile_instead: true`, a spell countered this way is exiled instead of being put into its owner's graveyard; if they pay, nothing happens to it. |
309
310
  | [`create_emblem`](docs/reference/effects.md#create_emblem) | 114.1, 114.2, 114.3, 114.4, 113.6p | Each referenced player (default you) gets an emblem with the `abilities` (triggered, static or player_rule abilities). An emblem is in the command zone for the rest of the game; its abilities work there, and "this emblem" is the source of what they do. |
310
311
  | [`create_token`](docs/reference/effects.md#create_token) | 111.1, 111.10, 701.7a, 704.5d, 508.4, 506.3b, 707.2 | Create `amount` tokens under the referenced player's control (default: you). `token` is a predefined token name (Treasure, Clue, Food) or an inline card definition. `tapped: true` creates them tapped; `attacking: true` attacking (only for the attacking player during combat, CR 506.3b); when the defending player controls a planeswalker, the controller chooses for each token whether it attacks that player or one of their planeswalkers (CR 508.4). `size` (an amount, fixed as the effect starts) makes them N/N ("an X/X Spirit token, where X is ..."; part of their copiable values). |
311
312
  | [`create_token_copy`](docs/reference/effects.md#create_token_copy) | 707.2, 707.8, 707.9a, 707.9b, 205.1a, 205.1b, 111.1, 614.1c | For each object `of` refers to (a permanent, a card in any zone, or the source with "self"), the referenced players (default: you) each create `amount` tokens that are copies of it: its copiable values (its card as modified by other copy effects, not counters, status or other effects), with the `except` modifications. The tokens are the effect's result, for later effects such as granting haste or a delayed sacrifice. |
312
313
  | [`damage_replacement`](docs/reference/effects.md#damage_replacement) | 614.1a, 611.2a, 611.2c, 616.1 | For the `duration` (end_of_turn by default, or until_your_next_turn), damage that would be dealt to the referenced players and permanents (`to`, fixed as it resolves; with `permanents: true` also the permanents a referenced player controls as the damage is dealt) is changed: `multiply` (2 = "double that damage") or `plus` an amount (computed as it resolves). `combat`: combat | noncombat only. Doubling applies before adding. |
313
314
  | [`damage_unpreventable`](docs/reference/effects.md#damage_unpreventable) | 615.12, 611.2a | Until end of turn, damage (`combat`: combat | noncombat only) can't be prevented. |
314
- | [`deal_damage`](docs/reference/effects.md#deal_damage) | 120.3a, 120.3c, 120.3e, 120.6, 120.4a, 120.10 | Deal `amount` damage to each referenced creature, planeswalker or player. Damage to a player causes life loss; to a planeswalker removes loyalty counters; to a creature is marked until cleanup. {"this_way": n} naming it is the excess damage it dealt (beyond lethal damage, or a planeswalker's loyalty). |
315
+ | [`deal_damage`](docs/reference/effects.md#deal_damage) | 120.3a, 120.3c, 120.3e, 120.6, 120.4a, 120.10, 614.1a, 700.4 | Deal `amount` damage to each referenced creature, planeswalker or player. Damage to a player causes life loss; to a planeswalker removes loyalty counters; to a creature is marked until cleanup. {"this_way": n} naming it is the excess damage it dealt (beyond lethal damage, or a planeswalker's loyalty). `exile_if_dies: true`: a permanent dealt damage this way that would die this turn is exiled instead (not one whose damage was prevented). |
315
316
  | [`delayed_trigger`](docs/reference/effects.md#delayed_trigger) | 603.7a, 603.7b, 603.7c, 603.7d, 603.7e, 107.3n | Creates a delayed triggered ability with the controller and source of the resolving spell or ability. It triggers only once, the next time `when` happens (e.g. {"step_begins": {"step": "end", "whose": "each"}} for the next end step). Its `effects` may use {"result": n} for what earlier effects of the creating list moved or created (n below its position); those objects are affected only if they are still where they were put. Its own effects are numbered on from there. |
316
317
  | [`destroy`](docs/reference/effects.md#destroy) | 701.8a | Destroy each referenced permanent (it goes to its owner's graveyard). |
317
318
  | [`dig`](docs/reference/effects.md#dig) | 701.20a, 701.20e, 401.4, 400.7j, 406.3, 607.2a, 702.75a | Look at the top `amount` cards of your library (`reveal: "all"`: reveal them). Take `count` (default 1; "all": every matching card, no choice; "any": any number) cards matching `for` and put them into `put` (`tapped` onto the battlefield); `optional`: you may take fewer. `reveal: "chosen"` reveals the cards taken. The rest go to `rest`: "bottom_random" (default), "bottom_any" (in an order you choose) or "graveyard". `put: "exile"` takes `face_down: true` (only you may look at them) and `link: true` (exiled with the source, CR 607.2a); `looker: "source_controller"`: whoever controls the source may look at them instead of you (hideaway, CR 702.75a). |
@@ -350,7 +351,7 @@ Rules version: Comprehensive Rules effective 2026-11-06.
350
351
  | [`mill`](docs/reference/effects.md#mill) | 701.17a | Each referenced player puts the top `amount` cards of their library into their graveyard (default: you). |
351
352
  | [`pay`](docs/reference/effects.md#pay) | 118.12, 118.12a, 118.3, 119.4, 605.3a, 701.67a, 701.67c | You may pay `cost` (a list of costs: mana, life, discarding, sacrificing, a `one_of` choice, ...) as it resolves; `mana`, `life` and `waterbend` are shorthands for one cost. If you do, `then` happens; if you don't, `otherwise`. Paying mana works like paying a spell's cost (mana abilities may be activated; a `waterbend` cost may also be paid by tapping artifacts and creatures, CR 701.67a); a cost that can't be paid can't be chosen (CR 118.3). For another player paying, see `counter_unless_pays`. |
352
353
  | [`phase_out`](docs/reference/effects.md#phase_out) | 702.26a, 702.26b, 702.26d, 702.26g, 702.26h, 502.1, 506.4 | Each referenced permanent phases out, with the Auras and Equipment attached to it (indirectly). It phases in during the untap step of the player who controlled it as it phased out. Phasing isn't a zone change: no enters or leaves triggers. |
353
- | [`play_permission`](docs/reference/effects.md#play_permission) | 611.2a, 611.2b, 601.3, 305.1, 400.7, 514.2, 601.2f, 108.3, 406.3b, 609.4b, 118.9, 701.67a | A player may play (`play: "play"`, default) or cast (`"cast"`) each referenced exiled card matching `for`/`not_types`, paying its costs and following timing rules, for `duration`: end_of_turn (default), end_of_your_next_turn, until_your_next_end_step, while_exiled or while_you_control_source ("for as long as you control this creature"). With `choose: "one_per_owner"` only one chosen card per owner. `to_player`: who may play it, "controller" (default, the effect's controller), "owner" (the card's owner) or a player selector (a face-down card: only someone who may look at it). `cost_increase`: spells cast this way cost that much generic mana more. `any_mana_type: true`: mana of any type can be spent to cast those spells. `during: "your_turn"`: only during your turn. `waterbend: "mana_value"`: cast it by waterbending {X} rather than paying its mana cost, where X is its mana value. |
354
+ | [`play_permission`](docs/reference/effects.md#play_permission) | 611.2a, 611.2b, 601.3, 305.1, 305.2, 400.7, 514.2, 601.2f, 108.3, 406.3b, 609.4b, 118.9, 701.67a | A player may play (`play: "play"`, default) or cast (`"cast"`) each referenced exiled card (`zone: "graveyard"`: card in a graveyard) matching `for`/`not_types`, paying its costs and following timing rules (a land uses a land play), for `duration`: end_of_turn (default), end_of_your_next_turn, until_your_next_end_step, while_exiled or while_you_control_source ("for as long as you control this creature"). With `choose: "one_per_owner"` only one chosen card per owner. `to_player`: who may play it, "controller" (default, the effect's controller), "owner" (the card's owner) or a player selector (a face-down card: only someone who may look at it). `cost_increase`: spells cast this way cost that much generic mana more. `any_mana_type: true`: mana of any type can be spent to cast those spells. `during: "your_turn"`: only during your turn. `waterbend: "mana_value"`: cast it by waterbending {X} rather than paying its mana cost, where X is its mana value. |
354
355
  | [`player_rule`](docs/reference/effects.md#player_rule) | 702.11c, 115.4, 508.1c, 402.2, 514.1, 615.1, 615.1a, 704.5a, 104.3b, 701.21a, 614.17b, 101.2, 601.3, 701.6a, 119.7, 602.5, 615.12, 702.16b, 702.16e, 702.16k, 506.3, 611.2a, 514.2 | Each referenced player (default you) gets `rule` for the `duration`: end_of_turn (default) or until_your_next_turn (until the controller's next turn begins). Rules: hexproof, cant_attack, no_max_hand_size, prevent_all_damage, cant_lose_for_life, cant_cast, cant_cast_except_from_hand, spells_cant_be_countered, abilities_cant_be_countered, cant_gain_life, cant_activate, damage_cant_be_prevented, combat_damage_cant_be_prevented, protection_from_opponents. |
355
356
  | [`plot`](docs/reference/effects.md#plot) | 702.170c, 702.170d, 406.1 | Each referenced card or spell is exiled (if it isn't already) and becomes plotted: its owner may cast it from exile without paying its mana cost during their main phase while the stack is empty, on any later turn (cast option `via: "plotted"`). |
356
357
  | [`prepare`](docs/reference/effects.md#prepare) | 723.3a, 723.3c | Each referenced permanent (default: this one) becomes prepared, if it has a prepare spell and isn't prepared already: its controller creates a copy of the prepare spell in exile and may cast that copy while the permanent stays prepared. Casting it unprepares the permanent. |
data/docs/guides/api.md CHANGED
@@ -307,6 +307,9 @@ game.submit(type: "activate_mana", object: "mountain#3",
307
307
  game.submit(type: "pay_mana", mana: "R") # pay_cost: spend it -> the spell is cast
308
308
  ```
309
309
 
310
+ A mana ability whose mana is chosen as it's activated has one option per choice (`mana: "{G}"`), and one whose cost
311
+ taps another permanent ("{T}, Tap an untapped creature you control") has one per permanent it could tap (`tap: id`).
312
+
310
313
  Depending on the card, the engine also asks for modes (`choose_mode`), X
311
314
  (`choose_x`), kicker (`choose_kicker`), the number of targets
312
315
  (`choose_target_count`), how to divide damage (`distribute`), or which permanent
@@ -98,6 +98,7 @@ pool, so tap other sources first:
98
98
  | --- | --- |
99
99
  | "{T}: Add one mana of any color." | `{ "mana": { "cost": ["tap"], "color": "any_one" } }` |
100
100
  | "{T}: Add {R} or {G}." | `{ "mana": { "cost": ["tap"], "color": "any_one", "colors": ["R", "G"] } }` |
101
+ | "{T}, Tap an untapped creature you control: Add one mana of any color." | `{ "mana": { "cost": ["tap", { "tap_permanents": { "filter": "creature" } }], "color": "any_one" } }`: the permanent to tap is named by each activation option (`"tap": id`, CR 605.3a, 602.2b); only one (count 1) |
101
102
  | "{T}: Add two mana in any combination of {R} and/or {G}." | `{ "mana": { "cost": ["tap"], "color": "any", "amount": 2, "colors": ["R", "G"] } }` |
102
103
  | "{T}: Add {G} for each creature you control." | `{ "mana": { "cost": ["tap"], "produce": "{G}", "amount": { "count": { "each": "creature", "controller": "you" } } } }` |
103
104
  | "{T}: Add X mana of any one color, where X is …" | `"color": "any_one", "amount": <amount>` |
@@ -106,6 +107,7 @@ pool, so tap other sources first:
106
107
  | "{T}, Remove a charge counter from this: Add one mana of any color." | `{ "mana": { "cost": ["tap", { "remove_counters": { "count": 1, "counter": "charge", "self": true } }], "color": "any_one" } }` (only `self: true` with a named `counter`: no choice; without {T} it may be activated once per counter) |
107
108
  | "{T}: Add {C}. Put a point counter on this." | `{ "mana": { "cost": ["tap"], "produce": "{C}", "add_counters": { "counter": "point", "amount": 1 } } }` (`amount` defaults to 1; using it during a payment makes the payment irreversible) |
108
109
  | "{T}: Add {C}. Spend this mana only to cast artifact spells or activate abilities of artifacts." | `{ "mana": { "cost": ["tap"], "produce": "{C}", "spend_only": { "spells": { "types": ["artifact"] }, "abilities": { "types": ["artifact"] } } } }` |
110
+ | "As this land enters, choose a creature type. {T}: Add one mana of any color. Spend this mana only to cast a creature spell of the chosen type, and that spell can't be countered." (Cavern of Souls) | `{ "choose_creature_type": {} }`, `{ "mana": { "cost": ["tap"], "color": "any_one", "spend_only": { "spells": { "types": ["creature"], "subtypes": "chosen" }, "cant_be_countered": true } } }` |
109
111
 
110
112
  ```json
111
113
  { "name": "Example Lyceum", "types": ["land"],
@@ -118,7 +120,10 @@ card spec (`"card"` for any spell or source). The mana stays in its own part of
118
120
  (`restricted_mana` in the view) and is offered as `{"type": "pay_mana", "mana": "C",
119
121
  "restricted": 0}` only while casting a matching spell or activating an ability of a
120
122
  matching source; it can't pay a cost asked for while something resolves. `add_mana`
121
- takes `spend_only` too ("Add {C}{C}. Spend this mana only to cast spells.").
123
+ takes `spend_only` too ("Add {C}{C}. Spend this mana only to cast spells."). A spec of
124
+ `"subtypes": "chosen"` is the creature type chosen for the mana's source, fixed as the mana is made, so the mana
125
+ keeps it after the source leaves (CR 607.2d, 106.6); with no type chosen it pays for nothing. `"cant_be_countered":
126
+ true` (with `spells`): a spell cast with this mana can't be countered (CR 101.2).
122
127
 
123
128
  ---
124
129
 
@@ -286,6 +291,7 @@ whose qualities must all match:
286
291
  | `"attached"` | "equipped creature" / "enchanted creature", on an Equipment or Aura |
287
292
  | `{ "each": "creature", "controller": "you" }` | "creatures you control", "each creature you control" |
288
293
  | `{ "each": "creature", "controller": "opponent" }` | "creatures your opponents control" |
294
+ | `{ "each": "creature", "controller": { "target": 0 } }` | "each creature target player controls" (none if that player is no longer a legal target, CR 608.2b) |
289
295
  | `{ "each": "creature" }` | "each creature", "all creatures" |
290
296
  | `{ "result": 0 }` | "it" / "that card" / "the token": what effect 0 of the same list moved or created (CR 400.7j) |
291
297
  | `"gift_recipient"` | "the chosen player" of a gift (CR 702.174a; see 4.24) |
@@ -397,7 +403,7 @@ See `docs/reference/effects.md` for the generated list. Currently:
397
403
  | `lose_life` | "each opponent loses N life" | `{ "lose_life": { "amount": N, "to": "each_opponent" } }` |
398
404
  | `draw` | "draw N cards" | `{ "draw": { "amount": N } }` (`to` defaults to `"you"`) |
399
405
  | `destroy` | "destroy target …" | `{ "destroy": { "to": … } }` |
400
- | `counter` | "counter target spell" | `{ "counter": { "to": { "target": 0 } } }` |
406
+ | `counter` | "counter target spell" | `{ "counter": { "to": { "target": 0 } } }` (`"exile_instead": true`: "if that spell is countered this way, exile it instead of putting it into its owner's graveyard") |
401
407
 
402
408
  ### 4.7 Mana effects, X and cost changes
403
409
 
@@ -414,6 +420,7 @@ See `docs/reference/effects.md` for the generated list. Currently:
414
420
  | "Noncreature spells you cast cost {1} less to cast." | `{ "cost_modifier": { "spells": { "not": ["creature"] }, "reduce": 1 } }` |
415
421
  | "Spells your opponents cast cost {1} more to cast." | `{ "cost_modifier": { "caster": "opponent", "increase": 1 } }` |
416
422
  | "Dragon spells you cast cost {1} less" / "Red spells you cast cost {1} less" | `{ "cost_modifier": { "spells": { "subtypes": ["dragon"] }, "reduce": 1 } }` / `"spells": { "colors": ["R"] }` (combine with `any_of` / `not`) |
423
+ | "The first non-Lemur creature spell with flying you cast during each of your turns costs {1} less to cast." | `{ "cost_modifier": { "spells": { "any_of": ["creature"], "keywords": ["flying"], "not_subtypes": ["lemur"] }, "reduce": 1, "first": "each_of_your_turns" } }` (`"first": "each_turn"`: on any turn) |
417
424
  | "This ability costs {1} less to activate for each land you control." | `"cost_reduction": { "amount": {...} }` inside the `activated` ability |
418
425
 
419
426
  An activated ability without targets that adds mana is a *mana ability* (CR 605.1a):
@@ -577,6 +584,17 @@ equips for a non-mana cost, and granted activated abilities ("equipped creature
577
584
  in exile). `not_types: ["land"]` keeps only the nonland card an exile-until found;
578
585
  `"choose": "one_per_owner"` with `"for": { "types": ["land"] }` makes the controller
579
586
  pick one matching card per owner among the exiled ones.
587
+ - **Playing a milled card** (CR 601.3, 305.2, 400.7): `"zone": "graveyard"` on
588
+ `play_permission` grants it for the referenced cards in a graveyard instead of exile
589
+ (any duration but `while_exiled`). A land played this way uses the turn's land play; the
590
+ permission ends at end of turn (or its `duration`) and as soon as the card leaves the
591
+ graveyard, a spell cast this way included. "When this artifact enters, mill a card. You
592
+ may play that card this turn":
593
+ ```json
594
+ { "triggered": { "when": { "enters": {} }, "effects": [
595
+ { "mill": { "amount": 1 } },
596
+ { "play_permission": { "to": { "result": 0 }, "zone": "graveyard" } } ] } }
597
+ ```
580
598
  - **Exiled face down** (CR 406.3): `"face_down": true` on `exile_top`; `looker` names the
581
599
  players who may look at the cards (default: you). A face-down card has no
582
600
  characteristics, its id doesn't name it (`face_down#12`), and views and events show
@@ -670,6 +688,7 @@ Generic shapes (N, [quality] and [zone] stand for whatever the card says):
670
688
  | return a [quality] card from your graveyard to your hand; if you can't, [effect] | `{ "choose_cards": { "from": { "graveyard": "you" }, "for": spec, "put": "hand", "otherwise": [ … ] } }` |
671
689
  | target opponent reveals their hand; you choose a [quality] card from it; that player discards that card | `{ "choose_cards": { "from": { "hand": { "target": 0 } }, "for": spec, "reveal": "all", "put": "discard" } }` (a discard: discard triggers see it) |
672
690
  | look at a player's hand; you may choose a [quality] card; if you do, [effect] | `{ "choose_cards": { "from": { "hand": { "target": 0 } }, "look": true, "for": spec, "optional": true, "put": "exile", "then": [ … ] } }` |
691
+ | exile a card from an opponent's graveyard. Then search its owner's graveyard, hand, and library for any number of cards with that name and exile them. That player shuffles, then draws a card for each card exiled from their hand this way (Deadly Cover-Up) | effect 1 `{ "choose_cards": { "from": { "graveyard": "each_opponent" }, "for": "card", "put": "exile" } }`, then `{ "choose_cards": { "from": { "graveyard": P, "hand": P, "library": P }, "for": { "same_name_as": { "result": 1 } }, "count": "any", "look": true, "put": "exile" } }`, `{ "shuffle_library": { "to": P } }`, `{ "draw": { "amount": { "this_way": 2 }, "to": P } }` with P = `{ "controller_of": { "result": 1 } }` (several zones are one choice, CR 701.23a; a `choose_cards` amount is how many came from a hand) |
673
692
  | each player sacrifices a [quality] permanent of their choice | `{ "sacrifice_choice": { "filter": filter, "to": { "each": "player" } } }` (`"count": "any"`: any number) |
674
693
  | exile a target card in a graveyard; return a target card from your graveyard to your hand | `exile` / `return_to_hand` with a `graveyard_card` target |
675
694
  | its owner puts it on the top or bottom of their library, as they choose | `{ "put_in_library": { "to": { "target": 0 }, "position": "owner_choice" } }` |
@@ -733,6 +752,7 @@ types; other subtypes (Equipment, Vehicle) stay unless `types` is set too.
733
752
  | "That token gains haste. Sacrifice it at the beginning of the next end step." | `grant` and `delayed_trigger` with `{ "result": n }` (the tokens are the effect's result) |
734
753
  | "exile target creature card from your graveyard, create a token that's a copy of it" | `exile`, then `{ "create_token_copy": { "of": { "result": 0 } } }` |
735
754
  | "you may have this creature enter as a copy of any artifact or creature on the battlefield …, with the same counters" | `{ "enter_as_copy": { "of": { "permanent": { "any_of": ["artifact", "creature"] } }, "except": { "legendary": false }, "with_counters": true } }` |
755
+ | "you may have this creature enter as a copy of any creature card in a graveyard, except … When you do, exile that card" | `{ "enter_as_copy": { "of": { "graveyard_card": { "any_of": ["creature"] } }, "except": { … }, "then": [{ "reflexive_trigger": { "effects": [{ "exile": { "to": { "triggering": "object" } } }] } }] } }` (CR 707.2, 603.12; no `with_counters`) |
736
756
  | "… becomes a copy of target Equipment until end of turn" | `{ "become_copy": { "to": …, "of": { "target": 0 } } }` (`"duration": "permanent"` while it stays) |
737
757
  | "When you cast this spell, copy it." | a `{ "cast": { "self": true } }` trigger with `{ "copy_spell": { "of": "self" } }` |
738
758
  | "copy target instant or sorcery spell; you may choose new targets for the copy" | `{ "copy_spell": { "of": { "target": 0 }, "new_targets": true } }` |
@@ -743,6 +763,20 @@ types; other subtypes (Equipment, Vehicle) stay unless `types` is set too.
743
763
  | "activate only if this card is exiled" | `"zone": "exile"` on the activated ability |
744
764
  | "Changeling (This object is every creature type.)" | `"keywords": ["changeling"]` |
745
765
 
766
+ `enter_as_copy` copies a permanent on the battlefield, or with a `graveyard_card` filter in
767
+ `of` a card in a graveyard (its copiable values are the card's, CR 707.2). Its `then` list
768
+ runs once the permanent has entered as a copy, so "When you do, …" is a `reflexive_trigger`
769
+ there (CR 603.12). `{"triggering": "object"}` is what it copied and `"player"` is that object's owner. Declining
770
+ the copy runs nothing. Superior Spider-Man ("… except his name is Superior Spider-Man and he's a
771
+ 4/4 Spider Human Hero in addition to his other types. When you do, exile that card"):
772
+
773
+ ```json
774
+ { "enter_as_copy": { "of": { "graveyard_card": { "any_of": ["creature"] } },
775
+ "except": { "name": "Superior Spider-Man", "power": 4, "toughness": 4,
776
+ "subtypes": ["spider", "human", "hero"] },
777
+ "then": [{ "reflexive_trigger": { "effects": [{ "exile": { "to": { "triggering": "object" } } }] } }] } }
778
+ ```
779
+
746
780
  A token copy is a token (the filter `"token": true` matches it). A copy of a permanent
747
781
  spell becomes a token as it resolves (CR 608.3f). A spell copy that leaves the stack, or
748
782
  a card copy outside the stack and battlefield, ceases to exist (CR 707.10a).
@@ -1193,6 +1227,8 @@ opponent or a permanent an opponent controls". `combat` is `"combat"` or `"nonco
1193
1227
  | "After this phase, there is an additional combat phase [followed by an additional main phase]" | `{ "additional_phases": { "phases": ["combat", "main"] } }`; "if it's the first combat phase of the turn" is `{ "first_combat_phase": true }` |
1194
1228
  | "If a creature an opponent controls would die, exile it instead" | `{ "exile_if_dies": { "affects": { "each": "creature", "controller": "opponent" } } }` |
1195
1229
  | "If one or more tokens would be created under your control, twice that many ... instead" | `"double_tokens"` |
1230
+ | "If you would draw a card, draw two cards instead" (CR 614.11) | `{ "draw_replacement": { "amount": 2 } }` (each card drawn becomes two) |
1231
+ | "As long as you have one or fewer cards in hand, if you would draw one or more cards, you draw that many cards plus one instead" (CR 614.11, 121.2) | `{ "draw_replacement": { "plus": 1, "if": { "hand_size": "you", "at_most": 1 } } }`: applies once to the whole instruction ("draw two" becomes three), the condition checked as the draw would happen; `if` takes any condition (also with `amount`). With a per-card `amount` effect too, the plus applies first, then each card is multiplied |
1196
1232
 
1197
1233
  ```json
1198
1234
  { "name": "Example Pyre Warden", "mana_cost": "{2}{R}{W}", "types": ["creature"], "subtypes": ["human", "wizard"],
@@ -1246,9 +1282,12 @@ its seed and decisions, and an exported game continues with the same results.
1246
1282
  | "Exile X artifact cards from your graveyard: … -X/-X" (CR 601.2b) | `{ "exile_from_graveyard": { "count": "X", "card": { "types": ["artifact"] } } }` in the `cost` (X is announced, at most the number of matching cards; also `discard`, `exile_from_hand`) and the amount `"x"` in effects |
1247
1283
  | "As this land enters, you may behold a Jace. If you don't, this land enters tapped." (CR 614.12) | `{ "enters_tapped_unless_behold": { "card": { "subtypes": ["jace"] } } }` (the `enter_choice` option `{type: "behold", object: id}`) |
1248
1284
  | "Gift a Treasure … Return target spell to its owner's hand. If the gift was promised, …" (CR 702.174) | `"gift"` in `abilities`; the gift as the spell's first effect, `{ "create_token": { "token": "Treasure", "to": "gift_recipient", "if": { "cast_with": "gift" } } }`, then the rest (on a permanent: an `enters` trigger with `"if": { "cast_with": "gift" }`) |
1285
+ | "Bargain (You may sacrifice an artifact, enchantment, or token as you cast this spell.) … If this spell was bargained, …" (CR 702.166) | `"bargain"` in `abilities` (announced with `choose_kicker`, the permanent chosen with `choose_cost`); `"if": { "cast_with": "bargain" }` on what the bargained spell does |
1286
+ | "… deals 2 damage to target creature. If a permanent dealt damage this way would die this turn, exile it instead." | `{ "deal_damage": { "amount": 2, "to": { "target": 0 }, "exile_if_dies": true } }`: only a permanent actually dealt damage (not one whose damage was prevented, CR 614.1a, 700.4) |
1249
1287
  | "You may discard your hand. If you do, draw …" / "… Draw X cards, where X is the number of cards discarded this way" | `{ "may": { "effects": [{ "discard": { "hand": true } }], "then": [ … ] } }`; X is `{ "this_way": n }` of that effect (n: its position in the list) |
1250
1288
  | "Noncreature spells you cast have improvise." (CR 702.126a) | `{ "spells_have": { "spells": { "not_types": ["creature"] }, "keywords": ["improvise"] } }` (convoke too) |
1251
1289
  | "Counter target spell unless its controller pays {2}. If …, {4} instead" | two `counter_unless_pays` with opposite `if` conditions (`cost` takes a list of costs too) |
1290
+ | "Counter target spell unless its controller pays {3}. If that spell is countered this way, exile it instead of putting it into its owner's graveyard." (CR 701.6a, 614.1a) | `{ "counter_unless_pays": { "mana": "{3}", "to": { "target": 0 }, "exile_instead": true } }` (if they pay, nothing is exiled) |
1252
1291
 
1253
1292
  Which `one_of` option is paid is announced while casting or activating, after modes and before X
1254
1293
  (the `choose_cost_option` decision, CR 601.2b); only options that could be paid are offered, and a
@@ -181,7 +181,7 @@ Keyword breakdown: plot 7, craft 4, Case / suspect 3, leyline / opening hand 3,
181
181
  | Case of the Uneaten Feast | FAIL | Case mechanic (To solve / Solved, CR 719) not supported; also granting 'you may cast this card from your graveyard' to graveyard cards until end of turn |
182
182
  | Clay-Fired Bricks // Cosmium Kiln | FAIL | Craft with artifact (exile this and another artifact / artifact card from graveyard, return transformed) is not supported |
183
183
  | Corpses of the Lost | PARTIAL | The end-step trigger ('if you descended this turn, you may pay 1 life; if you do, return this to its owner's hand') is left out: no condition for descend (a permanent card put into your graveyard this turn). |
184
- | Deadly Cover-Up | FAIL | Collect evidence (CR 701.59) not supported; also searching graveyard/hand/library for cards with that name |
184
+ | Deadly Cover-Up | FAIL | Collect evidence (CR 701.59) not supported; also searching graveyard/hand/library for cards with that name (**done, Unreleased**: `choose_cards` from several zones with `library`, card spec `same_name_as: {"result": n}`) |
185
185
  | Doc Aurlock, Grizzled Genius | PARTIAL | 'Plotting cards from your hand costs {2} less' is left out: Enjine has no plot. |
186
186
  | Dust Animus | PARTIAL | Plot {1}{W} is left out (no plot in Enjine). 'Enters with two +1/+1 counters and a lifelink counter if you control five or more untapped lands' is an ETB trigger that checks the same condition, because enters_with_counters takes no condition. |
187
187
  | Forsaken Miner | PARTIAL | the 'Whenever you commit a crime, you may pay {B}. If you do, return this card from your graveyard to the battlefield' ability: Enjine has no commit-a-crime trigger |
@@ -206,7 +206,7 @@ Keyword breakdown: plot 7, craft 4, Case / suspect 3, leyline / opening hand 3,
206
206
  | The Enigma Jewel // Locus of Enlightenment | PARTIAL | Craft with four or more nonlands with activated abilities {8}{U} is left out (no craft), so it never transforms; the back face Locus of Enlightenment has none of its abilities (gaining the exiled cards' activated abilities, copying non-mana abilities) |
207
207
  | The Mind Stone | FAIL | Harness / ∞ (Infinity Stone) abilities that become active once harnessed are not supported |
208
208
  | The Soul Stone | PARTIAL | harness cost 'Exile a creature you control' is paid by sacrificing a creature instead (no exile-a-permanent cost); harnessing is modelled as the Stone gaining the ∞ upkeep trigger for as long as it stays on the battlefield, with the harness ability limited to once (re-harnessing does nothing on the real card) |
209
- | Torch the Tower | FAIL | Bargain (CR 702.166) not a primitive; and 'if a permanent dealt damage by this spell would die this turn, exile it' needs a replacement conditional on the damage actually being dealt (exile_if_dies on the target ignores prevented damage) |
209
+ | Torch the Tower | FAIL | Bargain (CR 702.166) not a primitive; and 'if a permanent dealt damage by this spell would die this turn, exile it' needs a replacement conditional on the damage actually being dealt (exile_if_dies on the target ignores prevented damage) (**done, Unreleased**: `bargain` and `deal_damage` `exile_if_dies`) |
210
210
  | Turn Inside Out | PARTIAL | 'When it dies this turn, manifest dread' is left out (no manifest / face-down 2/2 creatures) |
211
211
  | Unholy Annex // Ritual Chamber | PARTIAL | Room layout isn't supported: written as the Unholy Annex half plus a once-only sorcery-speed {3}{B}{B} 'unlock' ability for Ritual Chamber; Ritual Chamber can't be cast on its own and the mana value is always 3 |
212
212
  | Urgent Necropsy | PARTIAL | the additional cost 'collect evidence X, where X is the total mana value of the permanents this spell targets' (collect evidence has no primitive), so it is cheaper than printed |
@@ -234,7 +234,7 @@ Keyword breakdown: plot 7, craft 4, Case / suspect 3, leyline / opening hand 3,
234
234
  | Omniscience | FAIL | 'You may cast spells from your hand without paying their mana costs' as a static permission: no free-cast static ability (cast_free only works while an effect resolves) |
235
235
  | Radagast of Rhosgobel | FAIL | 'The first creature spell you cast each turn costs {2} less and can be cast as though it had flash': cost_modifier has no first-spell-each-turn limit and there is no flash-granting permission for spells |
236
236
  | Raphael, Most Attitude | FAIL | 'you may play a card exiled with Raphael' (a single card) — play_permission can't limit the permission to one card among the exiled ones |
237
- | Tablet of Discovery | FAIL | "You may play that card this turn" for a milled card: play_permission only works for cards in exile, not the graveyard |
237
+ | Tablet of Discovery | FAIL | "You may play that card this turn" for a milled card: play_permission only works for cards in exile, not the graveyard (**done, Unreleased**: `play_permission` `zone: "graveyard"`) |
238
238
  | Timeline Culler | PARTIAL | 'You may cast this card from your graveyard using its warp ability' is left out: warp works from the hand only |
239
239
  | Tinybones, Bauble Burglar | PARTIAL | the play permission for stash cards isn't limited to your turn and doesn't end when Tinybones leaves (play_permission while_exiled per card, not a static ability of Tinybones) |
240
240
 
@@ -253,7 +253,7 @@ Keyword breakdown: plot 7, craft 4, Case / suspect 3, leyline / opening hand 3,
253
253
  | Eluge, the Shoreless Sea | PARTIAL | The cost reduction only takes off generic mana ('{U} (or {1})' becomes {1} per flood land), so it does nothing for a spell with no generic cost. 'The first instant or sorcery each turn' is an amount that becomes 0 once you've cast an instant or sorcery this turn. (Written as reduce = flood lands x (1 - min(1, instants/sorceries you've cast this turn)), where the min is floor((n+99)/100), because divisors must be fixed integers.) Also, a flood land is an Island only while Eluge is on the battlefield (a static on Eluge), not for as long as the counter stays. |
254
254
  | Hearth Elemental // Stoke Genius | FAIL | cost reduction counts graveyard cards that 'have an Adventure': no card filter for Adventure cards |
255
255
  | Mistrise Village | FAIL | "The next spell you cast this turn can't be countered": no one-shot uncounterable effect for the next spell |
256
- | Momo, Friendly Flier | FAIL | cost reduction for only the first non-Lemur creature spell with flying cast each turn |
256
+ | Momo, Friendly Flier | FAIL | cost reduction for only the first non-Lemur creature spell with flying cast each turn (**done, Unreleased**: `cost_modifier` `first`, `keywords`, `not_subtypes`) |
257
257
  | Radagast of Rhosgobel | FAIL | 'The first creature spell you cast each turn costs {2} less and can be cast as though it had flash': cost_modifier has no first-spell-each-turn limit and there is no flash-granting permission for spells |
258
258
  | Sunderflock | FAIL | Cost reduction by "the greatest mana value among Elementals you control": no greatest-mana-value amount |
259
259
  | Temur Battlecrier | PARTIAL | the 'During your turn' limit: the cost reduction also applies to spells cast on the opponent's turn (cost_modifier takes no condition) |
@@ -317,8 +317,8 @@ Keyword breakdown: plot 7, craft 4, Case / suspect 3, leyline / opening hand 3,
317
317
  | Abzan Devotee | FAIL | mana ability with 'Activate only once each turn': mana abilities take no limit (only only_if) |
318
318
  | Barrels of Blasting Jelly | FAIL | mana ability with 'Activate only once each turn': mana abilities take no limit (only only_if) |
319
319
  | Carnelian Orb of Dragonkind | FAIL | mana-spend rider ('if that mana is spent on a Dragon creature spell, it gains haste') not supported |
320
- | Cavern of Souls | FAIL | mana that makes the spell it's spent on uncounterable (spend_only has no such rider) |
321
- | Gene Pollinator | FAIL | Mana ability with a chosen additional cost ('Tap an untapped permanent you control'): mana abilities can't have costs needing a choice |
320
+ | Cavern of Souls | FAIL | mana that makes the spell it's spent on uncounterable (spend_only has no such rider) (**done, Unreleased**: `spend_only` `"subtypes": "chosen"` and `cant_be_countered`) |
321
+ | Gene Pollinator | FAIL | Mana ability with a chosen additional cost ('Tap an untapped permanent you control'): mana abilities can't have costs needing a choice (**done, Unreleased**: `tap_permanents` in a mana ability, option `tap`) |
322
322
  | Groundchuck & Dirtbag | FAIL | mana trigger 'Whenever you tap a land for mana, add {G}' (no tapped-for-mana trigger) |
323
323
  | Lavaleaper | PARTIAL | 'Whenever a player taps a basic land for mana, that player adds one mana of any type that land produced' (no mana-tapping trigger in Enjine) |
324
324
  | Pit of Offerings | PARTIAL | '{T}: Add one mana of any of the exiled cards' colors': no mana ability whose colors come from the cards exiled with it (left out; the land only taps for {C}) |
@@ -326,7 +326,7 @@ Keyword breakdown: plot 7, craft 4, Case / suspect 3, leyline / opening hand 3,
326
326
  | Raphael, Ninja Destroyer | FAIL | mana that isn't lost as steps and phases end until end of turn (add_mana `until` supports only end_of_combat) |
327
327
  | Scene of the Crime | PARTIAL | '{T}, Tap an untapped creature you control: Add one mana of any color': a mana ability's cost can't need a choice (left out) |
328
328
  | Secluded Courtyard | PARTIAL | the chosen creature type: the colored mana can be spent on any creature spell or ability of a creature source, not only of the chosen type (card specs can't read a chosen creature type), so the 'choose a creature type' is dropped |
329
- | Springleaf Drum | FAIL | mana ability cost with a choice (tap an untapped creature) is rejected by validation |
329
+ | Springleaf Drum | FAIL | mana ability cost with a choice (tap an untapped creature) is rejected by validation (**done, Unreleased**: `tap_permanents` in a mana ability, option `tap`) |
330
330
  | The Last Agni Kai | FAIL | no effect for keeping unspent red mana as steps and phases end until end of turn |
331
331
 
332
332
  <a id="7"></a>
@@ -420,7 +420,7 @@ Keyword breakdown: plot 7, craft 4, Case / suspect 3, leyline / opening hand 3,
420
420
  | Gnashing of Teeth | FAIL | mode 2 'Creatures target player controls get -1/-1': selector `each` can't be scoped to a targeted player (same gap as Practiced Offense) |
421
421
  | Hex Magic | FAIL | 'Exile all the cards from your hand': no selector for every card in a hand (choose_cards 'any' is optional, not all) |
422
422
  | Lost in the Maze | PARTIAL | 'Tapped creatures you control have hexproof' is left out (a static ability can't filter on tapped yet); 'X target creatures' may only be creatures an opponent controls (the card can also tap your own creatures, which then get no stun counter): an effect can't put counters on only the targets you don't control |
423
- | Practiced Offense | FAIL | no selector for 'each creature target player controls' |
423
+ | Practiced Offense | FAIL | no selector for 'each creature target player controls' (**done, Unreleased**: `each` `controller: {"target": n}`) |
424
424
  | Settle the Wreckage | FAIL | "all attacking creatures target player controls": selector `each` can't be scoped to a targeted player |
425
425
  | Tishana's Tidebinder | FAIL | Selector for the source permanent of a countered (targeted) ability, to make it lose all abilities, does not exist |
426
426
  | Turtle Van | FAIL | no target filter for 'creature that crewed it this turn' (and doubling the +1/+1 counters on it) |
@@ -438,8 +438,8 @@ Keyword breakdown: plot 7, craft 4, Case / suspect 3, leyline / opening hand 3,
438
438
  | Bloodletter of Aclazotz | PARTIAL | the life-loss doubling is approximated: at the beginning of your upkeep (and when it enters during your turn) damage dealt to an opponent is doubled until end of turn. Non-damage life loss isn't doubled, and the doubling lasts the rest of the turn even if Bloodletter leaves |
439
439
  | Draconic Visitor | FAIL | token_replacement replaces every token; no filter for only artifact tokens ('If one or more artifact tokens would be created') |
440
440
  | Leyline of the Void | PARTIAL | the opening-hand clause, and the replacement covers only opponents' creatures dying (exile_if_dies) instead of every card going to an opponent's graveyard from anywhere |
441
- | No More Lies | FAIL | counter_unless_pays can't exile the countered spell instead of putting it into the graveyard |
442
- | Quantum Riddler | FAIL | conditional draw replacement 'draw that many plus one' (draw_replacement only multiplies per card, no condition) |
441
+ | No More Lies | FAIL | counter_unless_pays can't exile the countered spell instead of putting it into the graveyard (**done, Unreleased**: `exile_instead`) |
442
+ | Quantum Riddler | FAIL | conditional draw replacement 'draw that many plus one' (draw_replacement only multiplies per card, no condition) (**done, Unreleased**: `plus` and `if`) |
443
443
  | Rest in Peace | FAIL | Replacement 'if a card or token would be put into a graveyard from anywhere, exile it instead' (exile_if_dies covers only permanents dying) |
444
444
  | Wolverine, Fierce Fighter | FAIL | Damage replacement 'that damage is dealt, but all other damage already dealt to him is healed' (damage_replacement has no heal-prior-damage option) |
445
445
  | Zhao, the Moon Slayer | PARTIAL | 'Nonbasic lands enter tapped' (no enters-tapped replacement for other permanents) and the conqueror-counter static making nonbasic lands Mountains that lose their other land types and abilities (no land-type-setting static) |
@@ -520,7 +520,7 @@ Keyword breakdown: plot 7, craft 4, Case / suspect 3, leyline / opening hand 3,
520
520
  |---|---|---|
521
521
  | Ancestral Anger | PARTIAL | X counts only the base 1: no amount for 'the number of cards named Ancestral Anger in your graveyard' (graveyard filters take no name), so the target always gets +1/+0 |
522
522
  | Ancient Vendetta | FAIL | Choose a card name; search an opponent's graveyard, hand and library for cards with that name |
523
- | Deadly Cover-Up | FAIL | Collect evidence (CR 701.59) not supported; also searching graveyard/hand/library for cards with that name |
523
+ | Deadly Cover-Up | FAIL | Collect evidence (CR 701.59) not supported; also searching graveyard/hand/library for cards with that name (**done, Unreleased**: `choose_cards` from several zones with `library`, card spec `same_name_as: {"result": n}`) |
524
524
  | Key to the Side-Door | FAIL | cost 'Discard a legendary card with the same name as a legendary permanent you control' (card spec can't compare names with permanents you control) |
525
525
  | Maelstrom Pulse | PARTIAL | 'and all other permanents with the same name as that permanent': no same-name filter; only the target is destroyed |
526
526
  | Petrified Hamlet | FAIL | Choose a land card name on an ETB trigger; grant mana ability / ban activation for sources with the chosen name (no name filter for chosen names) |
@@ -639,7 +639,7 @@ Keyword breakdown: plot 7, craft 4, Case / suspect 3, leyline / opening hand 3,
639
639
  | Ardyn, the Usurper | FAIL | token copy 'except it's a 5/5 black Demon' must replace creature types; copy `except.subtypes` only adds subtypes |
640
640
  | Face Yourself | FAIL | token copies 'except it has haste and "At the beginning of the end step, if you don't control a planeswalker, sacrifice this creature"': create_token_copy except can't add a triggered ability; also no selector for 'each creature target player controls' |
641
641
  | Mockingbird | PARTIAL | it may copy only a creature with mana value 1 or less (as if cast for X=0): the 'mana value <= amount of mana spent to cast this creature' bound can't be computed while choosing the copy (the enter_as_copy filter has no source, so mana_spent reads 0) |
642
- | Superior Spider-Man | FAIL | enter_as_copy only copies permanents on the battlefield, not a creature card in a graveyard (plus 'when you do, exile that card') |
642
+ | Superior Spider-Man | FAIL | enter_as_copy only copies permanents on the battlefield, not a creature card in a graveyard (plus 'when you do, exile that card') (**done, Unreleased**: `enter_as_copy` `graveyard_card` + `then`) |
643
643
 
644
644
  <a id="26"></a>
645
645
  ## 26. Modal (per-turn, up to X, repeat) (4)
@@ -106,6 +106,16 @@ Rules: CR 603.2d, CR 119.9, CR 607.2d
106
106
  }
107
107
  ```
108
108
 
109
+ ## bargain
110
+
111
+ Bargain: as you cast this spell you may sacrifice an artifact, enchantment or token (announced with the `choose_kicker` decision, the permanent chosen with `choose_cost`; the spell isn't kicked). `{"cast_with": "bargain"}` holds if it was bargained.
112
+
113
+ Rules: CR 702.166a, CR 702.166b, CR 702.166c, CR 601.2b, CR 601.2h, CR 701.21a
114
+
115
+ ```json
116
+ "bargain"
117
+ ```
118
+
109
119
  ## beam_me_up
110
120
 
111
121
  You may cast this instant or sorcery card from your graveyard for `cost` plus returning a creature you control to its owner's hand, instead of its mana cost. If you do, it's exiled whenever it would leave the stack. Offered as a cast option with `via: "beam:<ref>"`.
@@ -436,9 +446,9 @@ Rules: CR 717.2a, CR 717.2b, CR 717.2d, CR 717.3, CR 602.5d
436
446
 
437
447
  ## cost_modifier
438
448
 
439
- While on the battlefield: spells cast by `caster` (you, opponent or any; default you) whose card types match `spells` ({"any_of": [types], "not": [types]}, default all spells; `subtypes`, `colors` and `name` narrow it: "Dragon spells", "red spells"; `"subtypes": "chosen"`: of the type chosen for this permanent, `"name": "chosen"`: with the name its source chose) cost `reduce` less or `increase` more generic mana. `from` / `not_from`: only spells cast from (not from) that zone (hand | graveyard | exile | library | outside).
449
+ While on the battlefield: spells cast by `caster` (you, opponent or any; default you) whose card types match `spells` ({"any_of": [types], "not": [types]}, default all spells; `subtypes`, `colors` and `name` narrow it: "Dragon spells", "red spells"; `"subtypes": "chosen"`: of the type chosen for this permanent, `"name": "chosen"`: with the name its source chose; `keywords` / `not_subtypes`: "non-Lemur creature spells with flying") cost `reduce` less or `increase` more generic mana. `from` / `not_from`: only spells cast from (not from) that zone (hand | graveyard | exile | library | outside). `first`: only the first matching spell its caster casts `each_turn` or `each_of_your_turns` (spells cast before this permanent was there count too).
440
450
 
441
- Rules: CR 601.2f, CR 118.7a, CR 604.1, CR 601.2a
451
+ Rules: CR 601.2f, CR 118.7a, CR 604.1, CR 601.2a, CR 601.2i
442
452
 
443
453
  | Parameter | Description |
444
454
  | --- | --- |
@@ -448,6 +458,7 @@ Rules: CR 601.2f, CR 118.7a, CR 604.1, CR 601.2a
448
458
  | `increase` | amount |
449
459
  | `from` | zone |
450
460
  | `not_from` | zone |
461
+ | `first` | each_turn | each_of_your_turns |
451
462
 
452
463
  ```json
453
464
  {
@@ -706,13 +717,15 @@ Rules: CR 614.1a, CR 614.5, CR 111.1, CR 616.1
706
717
 
707
718
  ## draw_replacement
708
719
 
709
- While this permanent is on the battlefield, each time its controller would draw a card, they draw `amount` cards instead (even with an empty library). The draws it makes aren't replaced by it again, but another such effect applies to each of them.
720
+ While this permanent is on the battlefield (and its `if` condition holds as the draw would happen), each time its controller would draw: with `amount`, each card they would draw becomes `amount` cards (even with an empty library; the draws it makes aren't replaced by it again, but another such effect applies to each of them); with `plus`, an instruction to draw one or more cards draws that many plus `plus` instead, once for the whole instruction ("draw two" becomes three, not four). The affected player's best order is used: adding before multiplying each card.
710
721
 
711
- Rules: CR 614.11, CR 614.11a, CR 614.5, CR 121.2, CR 616.1
722
+ Rules: CR 614.11, CR 614.11a, CR 614.5, CR 121.2, CR 616.1, CR 604.2
712
723
 
713
724
  | Parameter | Description |
714
725
  | --- | --- |
715
- | `amount` | integer >= 2 |
726
+ | `amount` | integer >= 2 (each card drawn: that many instead) |
727
+ | `plus` | amount ("that many cards plus one"), instead of amount |
728
+ | `if` | condition, e.g. {"hand_size": "you", "at_most": 1} |
716
729
 
717
730
  ```json
718
731
  {
@@ -740,15 +753,16 @@ Rules: CR 702.5a, CR 115.1b, CR 303.4a
740
753
 
741
754
  ## enter_as_copy
742
755
 
743
- As this permanent enters, its controller may choose a permanent on the battlefield matching `of`; it enters as a copy of that permanent (its copiable values, with the `except` modifications) and its enter abilities trigger. `with_counters: true`: it also enters with the counters the copied permanent has. Choosing none: it enters as itself.
756
+ As this permanent enters, its controller may choose a permanent on the battlefield matching `of` (or, with a `graveyard_card` filter, a card in a graveyard); it enters as a copy of it (its copiable values, with the `except` modifications) and its enter abilities trigger. `with_counters: true`: it also enters with the counters the copied permanent has. `then`: effects once it entered as a copy, usually a reflexive_trigger ("When you do, exile that card"), reading {"triggering": "object"} (what it copied) and "player" (its owner). Choosing none: it enters as itself.
744
757
 
745
- Rules: CR 707.5, CR 707.9b, CR 205.1a, CR 614.1c, CR 614.12
758
+ Rules: CR 707.5, CR 707.2, CR 707.9b, CR 205.1a, CR 614.1c, CR 614.12, CR 603.12
746
759
 
747
760
  | Parameter | Description |
748
761
  | --- | --- |
749
- | `of` | filter (the permanents it may copy) |
762
+ | `of` | filter (the permanents, or graveyard cards, it may copy) |
750
763
  | `except` | {"legendary": false, "keywords": [...], "types": [...], "subtypes": [...], "supertypes": [...], "name": ..., "power": n, "toughness": n, "colors": [...], "replace": ["types" | "subtypes" | "supertypes"]} |
751
764
  | `with_counters` | boolean |
765
+ | `then` | list of effects (a reflexive_trigger for "When you do, ...") |
752
766
 
753
767
  ```json
754
768
  {
@@ -1264,9 +1278,9 @@ Rules: CR 606.3, CR 606.4, CR 606.5, CR 602.2b
1264
1278
 
1265
1279
  ## mana
1266
1280
 
1267
- An activated mana ability: pay the cost, add the mana to your mana pool immediately. It does not use the stack and can be activated whenever you have priority. `produce`: the fixed mana (`amount` times). Or `color`: `amount` mana (default 1) of one color you choose as you activate it (`"any_one"`) or in any combination of colors (`"any"`); `colors` limits the choice. `"chosen"`: of the color chosen as this entered (choose_color). `spend_only` restricts how the mana can be spent. `only_if`: "Activate only if ...". `limit: "once_each_turn"`: "Activate only once each turn." `add_counters`: it also puts counters on its own source ("Add {C}. Put a point counter on this").
1281
+ An activated mana ability: pay the cost, add the mana to your mana pool immediately. It does not use the stack and can be activated whenever you have priority. `produce`: the fixed mana (`amount` times). Or `color`: `amount` mana (default 1) of one color you choose as you activate it (`"any_one"`) or in any combination of colors (`"any"`); `colors` limits the choice. `"chosen"`: of the color chosen as this entered (choose_color). `spend_only` restricts how the mana can be spent (a spec of `"subtypes": "chosen"`: the creature type chosen as this entered; `"cant_be_countered": true`: a spell cast with it can't be countered). `only_if`: "Activate only if ...". `limit: "once_each_turn"`: "Activate only once each turn." `add_counters`: it also puts counters on its own source ("Add {C}. Put a point counter on this"). A `tap_permanents` cost (count 1) taps another permanent you choose as you activate it ("{T}, Tap an untapped creature you control"): each activation option names it (`tap`).
1268
1282
 
1269
- Rules: CR 605.1a, CR 605.3a, CR 605.3b, CR 106.1a, CR 106.4, CR 106.6, CR 607.2d, CR 602.5b, CR 122.1
1283
+ Rules: CR 605.1a, CR 605.3a, CR 605.3b, CR 106.1a, CR 106.4, CR 106.6, CR 607.2d, CR 602.5b, CR 122.1, CR 101.2, CR 602.2b, CR 302.6
1270
1284
 
1271
1285
  | Parameter | Description |
1272
1286
  | --- | --- |
@@ -1275,7 +1289,7 @@ Rules: CR 605.1a, CR 605.3a, CR 605.3b, CR 106.1a, CR 106.4, CR 106.6, CR 607.2d
1275
1289
  | `amount` | amount (default 1; with produce: how many times) |
1276
1290
  | `color` | any_one | any | chosen |
1277
1291
  | `colors` | list of colors to choose from (default all five) |
1278
- | `spend_only` | {"spells": card spec, "abilities": card spec, "from" | "not_from": zone} |
1292
+ | `spend_only` | {"spells": card spec, "abilities": card spec, "from" | "not_from": zone, "cant_be_countered": true} |
1279
1293
  | `only_if` | condition: it can be activated only while it holds (CR 602.5b) |
1280
1294
  | `limit` | "once_each_turn" (CR 602.5b) |
1281
1295
  | `add_counters` | {"counter": name, "amount": integer (default 1)}: put on this permanent |