enjine 0.5.0 → 0.6.1
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +156 -1
- data/README.md +12 -3
- data/SUPPORTED.md +44 -17
- data/docs/ARCHITECTURE.md +7 -2
- data/docs/MECHANICS_COVERAGE.md +10 -8
- data/docs/guides/api.md +2 -1
- data/docs/guides/card-data-format.md +40 -8
- data/docs/reference/abilities.md +254 -13
- data/docs/reference/costs.md +36 -0
- data/docs/reference/decisions.md +3 -1
- data/docs/reference/effects.md +93 -10
- data/docs/reference/filters.md +11 -1
- data/docs/reference/keywords.md +42 -0
- data/docs/reference/subtypes.md +18 -0
- data/docs/reference/triggers.md +69 -8
- data/docs/reference/types.md +20 -0
- data/lib/enjine/actions/special_action.rb +4 -0
- data/lib/enjine/actions/turn_face_up.rb +25 -0
- data/lib/enjine/actions/unlock.rb +23 -0
- data/lib/enjine/card_definition.rb +50 -12
- data/lib/enjine/card_face_down.rb +31 -0
- data/lib/enjine/card_faces.rb +4 -2
- data/lib/enjine/card_rooms.rb +86 -0
- data/lib/enjine/catalog.rb +9 -3
- data/lib/enjine/cli/text.rb +1 -0
- data/lib/enjine/color_identity.rb +34 -1
- data/lib/enjine/decisions/casting.rb +6 -3
- data/lib/enjine/engine/ability_layers.rb +8 -0
- data/lib/enjine/engine/casting/alt_casting.rb +12 -4
- data/lib/enjine/engine/casting/cast_choices.rb +8 -1
- data/lib/enjine/engine/casting/casting.rb +18 -22
- data/lib/enjine/engine/casting/costs.rb +8 -1
- data/lib/enjine/engine/casting/payment.rb +47 -9
- data/lib/enjine/engine/casting/permissions.rb +6 -3
- data/lib/enjine/engine/characteristics.rb +8 -9
- data/lib/enjine/engine/combat.rb +19 -7
- data/lib/enjine/engine/copies.rb +2 -1
- data/lib/enjine/engine/crimes.rb +46 -0
- data/lib/enjine/engine/damage.rb +36 -1
- data/lib/enjine/engine/face_down_permanents.rb +108 -0
- data/lib/enjine/engine/faces.rb +6 -3
- data/lib/enjine/engine/mana_sources.rb +18 -3
- data/lib/enjine/engine/options_memo.rb +140 -0
- data/lib/enjine/engine/permanent_designations.rb +29 -0
- data/lib/enjine/engine/resolution.rb +25 -5
- data/lib/enjine/engine/rooms.rb +86 -0
- data/lib/enjine/engine/rules.rb +2 -1
- data/lib/enjine/engine/state_based_actions.rb +25 -4
- data/lib/enjine/engine/triggers.rb +20 -5
- data/lib/enjine/engine/turn_history.rb +28 -5
- data/lib/enjine/engine/zones.rb +32 -6
- data/lib/enjine/engine.rb +9 -1
- data/lib/enjine/events.rb +9 -0
- data/lib/enjine/frames.rb +3 -0
- data/lib/enjine/fuzz.rb +3 -0
- data/lib/enjine/game.rb +3 -1
- data/lib/enjine/mechanics/abilities/cost_changes.rb +32 -10
- data/lib/enjine/mechanics/abilities/damage_replacements.rb +1 -1
- data/lib/enjine/mechanics/abilities/designated.rb +57 -0
- data/lib/enjine/mechanics/abilities/life_replacements.rb +74 -0
- data/lib/enjine/mechanics/abilities/mana_ability.rb +10 -4
- data/lib/enjine/mechanics/abilities/player_rules.rb +1 -1
- data/lib/enjine/mechanics/abilities/stack_abilities.rb +12 -7
- data/lib/enjine/mechanics/abilities/static.rb +18 -5
- data/lib/enjine/mechanics/card_spec.rb +12 -3
- data/lib/enjine/mechanics/costs/base.rb +3 -2
- data/lib/enjine/mechanics/costs/behold.rb +10 -3
- data/lib/enjine/mechanics/costs/choose_creature_type.rb +3 -3
- data/lib/enjine/mechanics/costs/collect_evidence.rb +60 -0
- data/lib/enjine/mechanics/costs/exile_permanent.rb +41 -0
- data/lib/enjine/mechanics/effects/base.rb +26 -5
- data/lib/enjine/mechanics/effects/choose_cards.rb +44 -14
- data/lib/enjine/mechanics/effects/copy.rb +2 -2
- data/lib/enjine/mechanics/effects/counters.rb +12 -6
- data/lib/enjine/mechanics/effects/delayed_triggers.rb +13 -6
- data/lib/enjine/mechanics/effects/may.rb +4 -2
- data/lib/enjine/mechanics/effects/pay.rb +20 -6
- data/lib/enjine/mechanics/filters/any_target.rb +6 -3
- data/lib/enjine/mechanics/filters/base.rb +14 -5
- data/lib/enjine/mechanics/filters/permanents.rb +7 -0
- data/lib/enjine/mechanics/keywords/alternative_costs.rb +70 -16
- data/lib/enjine/mechanics/keywords/cards_have.rb +4 -2
- data/lib/enjine/mechanics/keywords/craft.rb +132 -0
- data/lib/enjine/mechanics/keywords/cycling.rb +46 -7
- data/lib/enjine/mechanics/keywords/extort.rb +2 -0
- data/lib/enjine/mechanics/keywords/face_down.rb +165 -0
- data/lib/enjine/mechanics/keywords/impending.rb +75 -0
- data/lib/enjine/mechanics/keywords/increment.rb +2 -0
- data/lib/enjine/mechanics/keywords/infinity.rb +46 -0
- data/lib/enjine/mechanics/keywords/miracle.rb +142 -0
- data/lib/enjine/mechanics/keywords/ninjutsu.rb +101 -0
- data/lib/enjine/mechanics/keywords/offspring.rb +48 -0
- data/lib/enjine/mechanics/keywords/persist_and_undying.rb +42 -0
- data/lib/enjine/mechanics/keywords/split_second.rb +29 -0
- data/lib/enjine/mechanics/keywords/storm_and_cascade.rb +5 -0
- data/lib/enjine/mechanics/keywords/void.rb +34 -0
- data/lib/enjine/mechanics/linked.rb +2 -2
- data/lib/enjine/mechanics/mana_spent.rb +1 -1
- data/lib/enjine/mechanics/selector.rb +30 -9
- data/lib/enjine/mechanics/subtypes/case.rb +68 -0
- data/lib/enjine/mechanics/triggers/base.rb +13 -4
- data/lib/enjine/mechanics/triggers/crime.rb +28 -0
- data/lib/enjine/mechanics/triggers/damage.rb +33 -18
- data/lib/enjine/mechanics/triggers/draw_and_discard.rb +19 -6
- data/lib/enjine/mechanics/triggers/rooms.rb +49 -0
- data/lib/enjine/mechanics/triggers/zone_changes.rb +24 -9
- data/lib/enjine/mechanics/types/battle.rb +130 -0
- data/lib/enjine/mechanics/values.rb +74 -27
- data/lib/enjine/replacements.rb +18 -0
- data/lib/enjine/rules_monitor.rb +49 -75
- data/lib/enjine/snapshot/deep_copy.rb +23 -0
- data/lib/enjine/snapshot/player_checks.rb +10 -2
- data/lib/enjine/snapshot.rb +2 -1
- data/lib/enjine/state.rb +2 -2
- data/lib/enjine/verify.rb +10 -3
- data/lib/enjine/version.rb +1 -1
- data/lib/enjine/view.rb +49 -13
- data/lib/enjine.rb +1 -1
- metadata +29 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fde1590b396d19e899c2fb1c3a4d84f16696a43f4dc45fe07c8ca9fc6bf8a01c
|
|
4
|
+
data.tar.gz: 553667205ce6cb1ab14866e0f0e7cfa2c34102182460e7a09e352cff4adcb9be
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0c358469569ae3e2fc717e932202be9cf2602011074ed4e17f9a2f5fcf6511260f4270047ffcad69befb15649a4f56a9efeec4bcf27d34a035cb24c87832bf1f
|
|
7
|
+
data.tar.gz: 58bb47820eb19f73b97b3cf16d35f50e68eb8d0f20b7d41e32bbda2d11fc5338dda5193159deed98388047bf24efabd9b8428680d4b8b0b3b09508022f3b0a48
|
data/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,158 @@ change the public API; the stable surface is described in
|
|
|
8
8
|
|
|
9
9
|
## [Unreleased]
|
|
10
10
|
|
|
11
|
+
## [0.6.1] - 2026-11-29
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
- A static ability whose condition or bonus reads this turn's history applied one event late (CR 604.2, 611.3a,
|
|
15
|
+
613.4c): recording a permanent entering or a creature attacking reads characteristics, so the layer pass ran on the
|
|
16
|
+
history from before the entry and stayed cached. "As long as a land entered the battlefield under your control this
|
|
17
|
+
turn", "as long as a creature entered ...", celebration (two or more nonland permanents entered) and "as long as you
|
|
18
|
+
attacked with a creature this turn" (mid-declaration) now apply as the permanent enters or the attacker is declared.
|
|
19
|
+
|
|
20
|
+
## [0.6.0] - 2026-11-28
|
|
21
|
+
|
|
22
|
+
### Added
|
|
23
|
+
- An activated ability's `cost_reduction` amount may name its targets (`{"counters": {"of": {"target": 0}, "kind":
|
|
24
|
+
"+1/+1"}}`: "costs {1} less for each +1/+1 counter on the target", CR 601.2f); before targets are chosen, it counts as
|
|
25
|
+
any amount for affordability.
|
|
26
|
+
- Fuzz invariant: a pending decision always has at least one option.
|
|
27
|
+
- Keywords `split_second` (no spells or non-mana activated abilities while it's on the stack, also while another
|
|
28
|
+
object resolves; `spell_keywords` can grant it, CR 702.61), `persist` and `undying` (their dies triggers come with
|
|
29
|
+
the keyword, so statics granting them work and filters see them, CR 702.79a, 702.93a).
|
|
30
|
+
- Abilities `offspring` (optional additional cost plus a 1/1 token copy as it enters; `{"cast_with": "offspring"}`,
|
|
31
|
+
CR 702.175), `impending` (`amount`, `cost`: enters with time counters, not a creature while it has one, a counter
|
|
32
|
+
comes off at your end step; `{"cast_with": "impending"}`, CR 702.176a), `miracle` (the first card drawn this turn
|
|
33
|
+
triggers and may be cast for its miracle cost as the trigger resolves; `cards_have` with `zone: "hand"` grants it,
|
|
34
|
+
CR 702.94a) and `craft` (`cost`, `materials`: exile this and permanents you control and/or graveyard cards, return
|
|
35
|
+
it transformed; materials are `exiled_for_cost`, CR 702.167).
|
|
36
|
+
- Cost `collect_evidence` (exile graveyard cards with total mana value N or more, CR 701.59); "if evidence was
|
|
37
|
+
collected" is an optional `additional_cost` read by `{"cast_with": "additional_cost"}`.
|
|
38
|
+
- Condition `{"void": true}` (a nonland permanent left the battlefield or a spell was warped this turn).
|
|
39
|
+
- `flashback` takes `cost: "mana_cost"` (its flashback cost equals its mana cost; e.g. granted by `grant_ability`,
|
|
40
|
+
CR 702.34a). `warp` takes `from: ["hand", "graveyard"]` (CR 601.3).
|
|
41
|
+
- `cycling` takes a cost with {X} or a list of costs ("Cycling—Pay 2 life"); trigger `cycles` takes `self: true`
|
|
42
|
+
("when you cycle this card", a `zone: "graveyard"` ability whose X is the cycling ability's, CR 702.29c).
|
|
43
|
+
- Battles (CR 310): card type `battle` with a printed `defense` (it enters with defense counters, CR 310.4b) and the
|
|
44
|
+
battle type `siege`: an opponent becomes its protector as it enters (CR 310.12); the protector's opponents can
|
|
45
|
+
attack it and the protector blocks for it (CR 310.5, 310.9); damage removes defense counters (CR 120.3h); at 0
|
|
46
|
+
defense it's put into its owner's graveyard unless its triggered ability is still waiting (CR 704.5v); a Siege its
|
|
47
|
+
protector controls gets a new protector (CR 704.5x); defeated, a Siege exiles itself and its controller may cast its
|
|
48
|
+
back face without paying its mana cost (CR 310.12, 712.10). Filter `battle`; `any_target` now includes battles
|
|
49
|
+
(CR 115.4); views show `defense` and `protector`.
|
|
50
|
+
- Ability `life_gain_replacement` (CR 614.1a, 616.1): "if you would gain life, you gain twice that much / that much
|
|
51
|
+
plus 1 instead" (`multiply` / `plus`) and "if an opponent would gain life, that player loses that much life
|
|
52
|
+
instead" (`player: "opponent"`, `lose: true`).
|
|
53
|
+
- `choose_cards` takes `chooser` (a player selector: "target opponent chooses a card from among them", CR 608.2d; that
|
|
54
|
+
player looks at hidden cards first) and `count: "all"` (every matching card, no choice: "discards all cards with
|
|
55
|
+
that name").
|
|
56
|
+
- Card specs take `"name": "chosen"` (the card name chosen for the source or the resolving spell, CR 201.4): in
|
|
57
|
+
the card specs of resolving effects (`reveal_until`, `exile_top` `until`, `choose_cards`, `search_library`, ...) and
|
|
58
|
+
in `cost_modifier` `spells` (which takes `name` now), `player_rule` `spells` ("spells with the chosen name can't be
|
|
59
|
+
cast") and `grant_ability` `for`. Like `"subtypes": "chosen"`, it matches nothing in specs read without a source
|
|
60
|
+
(`play_permission`, `cards_have`, `convoke`, mana-ability spends, `cant_be_targeted_by` `abilities_from`).
|
|
61
|
+
- Triggers: `enters` and `dies` take `batched` ("whenever one or more ...", CR 603.2c); `deals_damage` takes `batched`
|
|
62
|
+
and `to` as `you`, `planeswalker`, `battle`, `permanent` or a list of them. A batched trigger's
|
|
63
|
+
`{"triggering": "objects"}` names the objects of every occurrence in its batch ("those creatures").
|
|
64
|
+
- `remove_counters` and `remove_all_counters` reach players' counters (poison, energy, experience, CR 122.1).
|
|
65
|
+
- Spell filters accept the card types `kindred` and `battle` (CR 308, 310).
|
|
66
|
+
- Static abilities may read combat and tapped status: `affects` with `{"creature": {"attacking": true}}`, `blocking`,
|
|
67
|
+
`tapped`, and an `if` such as `{"attacking": "attached"}` ("as long as equipped creature is attacking", CR 506.4).
|
|
68
|
+
- Committing a crime (CR 700.13): a spell cast, ability activated or triggered ability put on the stack that targets
|
|
69
|
+
an opponent, something an opponent controls or a card in an opponent's graveyard is one crime (activated and
|
|
70
|
+
triggered abilities count, not only spells). Trigger `commits_crime` (`controller`), amount `crimes_this_turn`,
|
|
71
|
+
event `crime_committed`.
|
|
72
|
+
- Cases (CR 720.3, 702.169): ability `to_solve` (a condition; at the beginning of your end step the Case becomes
|
|
73
|
+
solved), ability `solved` wrapping one static, triggered or activated ability, effect `solve`, condition
|
|
74
|
+
`{"solved": true}`. Solved is a permanent designation shown in views (`designations`).
|
|
75
|
+
- Harness and ∞ (CR 701.64, 702.186): effect `harness`, ability `infinity` wrapping one static, triggered or
|
|
76
|
+
activated ability, condition `{"harnessed": true}`; cost `exile_permanent` ("Exile a creature you control", not a
|
|
77
|
+
sacrifice; the cards are `exiled_for_cost`, their last known stats amount `sacrificed`).
|
|
78
|
+
- Ninjutsu (CR 702.49): an activated ability from the hand (not a cast): pay, reveal the card, return an unblocked
|
|
79
|
+
attacker; the card enters tapped and attacking what that creature attacked. Usable from the declare blockers step
|
|
80
|
+
to the end of combat.
|
|
81
|
+
- Rooms (CR 709.5, 116.2m): layout `room` (two doors sharing a type line). The card has both halves combined off the
|
|
82
|
+
battlefield, is cast as one door, and the permanent has only its unlocked doors' name, mana cost and abilities
|
|
83
|
+
(both locked: no name, mana value 0). Special action `{type: "unlock", object, door: "left" | "right"}`; trigger
|
|
84
|
+
`unlocks_door` (on a door: "when you unlock this door"; `door: "any"`, `fully: true`); views show `unlocked`.
|
|
85
|
+
- Face-down spells and permanents (CR 708): effects `manifest`, `cloak` and `manifest_dread` (CR 701.40, 701.58,
|
|
86
|
+
701.62); keyword abilities `morph` and `disguise` (cast face down for {3}, CR 702.37, 702.168); special action
|
|
87
|
+
`{type: "turn_face_up", object, via: "mana_cost" | "morph" | "disguise"}` (CR 116.2b); trigger `turned_face_up`;
|
|
88
|
+
amounts `entered_face_down_this_turn` and `turned_face_up_this_turn`. A face-down object is a nameless 2/2 (ward {2}
|
|
89
|
+
for cloak and disguise) with an id that doesn't name it; only its controller sees the card in views and events,
|
|
90
|
+
and it is revealed when it leaves the battlefield or stack and at the end of the game (CR 708.5, 708.9).
|
|
91
|
+
- Repeated keyword instances: `"keywords": ["cascade", "cascade"]` gives two cascade abilities that each trigger
|
|
92
|
+
(CR 702.85c); the same for `storm`, `extort` and `increment` (CR 702.40b, 702.101b, 702.191b). Other keywords
|
|
93
|
+
listed twice stay one instance (CR 702.2f).
|
|
94
|
+
- Effect lists nested in `may`, `pay`, `choose_cards`, `reflexive_trigger` and `delayed_trigger` number their own
|
|
95
|
+
results after the enclosing list's earlier effects: in a list nested in effect `i`, `{"result": n}` and
|
|
96
|
+
`{"this_way": n}` with `n < i` name the parent's effects as before, `i + j` the nested list's own effect `j` (a
|
|
97
|
+
`may`'s `then` continues after its `effects`; CR 608.2c, 603.12).
|
|
98
|
+
- `{"counters": {"of": {"triggering": "object"}}}`, and `power`, `toughness` and `mana_value` of `{"triggering":
|
|
99
|
+
"object"}`, read a permanent that left the battlefield as it last existed (CR 603.10a, 608.2h).
|
|
100
|
+
|
|
101
|
+
### Changed
|
|
102
|
+
- Faster legal options, with identical results (the same options in the same order, the same random numbers drawn):
|
|
103
|
+
while one decision's options are computed, a conservative mana pre-check rules out spells whose colored symbols the
|
|
104
|
+
player's mana can't reach (CR 601.2f-h) and costs above what the player could ever make; permission sources, play
|
|
105
|
+
methods, cost modifiers, battlefield characteristics and abilities by kind are found once per decision; exiled cards
|
|
106
|
+
of another owner no permission names are skipped (CR 108.3); cards with no face that has an alternative cost or a
|
|
107
|
+
special action skip the full look (`Engine::OptionsMemo`).
|
|
108
|
+
- `Game#view_for` reuses the pending decision's memoized options instead of generating them again
|
|
109
|
+
(`View.build` takes `options:`); views reuse each card's type line, mana cost text and keyword names (now frozen
|
|
110
|
+
strings), and `Snapshot.deep_copy` / `State#to_h` copy plain data without a Marshal round trip.
|
|
111
|
+
- `script/determinism_digest.rb`: plays seeded games (constructed example and random decks, the real cards, Duel
|
|
112
|
+
Commander) and prints a digest per game of every decision's options, views, export/import, rolled-back applies and
|
|
113
|
+
forks, to check that a performance change keeps games bit-identical.
|
|
114
|
+
|
|
115
|
+
### Fixed
|
|
116
|
+
- `pay` (and `counter_unless_pays` with `cost`): a cost's choices keep every key of the option, so `remove_counters`
|
|
117
|
+
removes the chosen counter kind (it removed nothing and still counted as paid), and `choose_creature_type` then
|
|
118
|
+
`behold` `"subtypes": "chosen"` work while resolving (the resolving spell or ability remembers the type, CR 118.12).
|
|
119
|
+
- `pay` in a triggered or activated ability: "this permanent" costs (`remove_counters` `self: true`, `sacrifice`,
|
|
120
|
+
`other: true`) refer to the source permanent while it is still on the battlefield under the ability's controller,
|
|
121
|
+
not to the ability on the stack (CR 113.7a); once it has left, they can't be paid (CR 400.7).
|
|
122
|
+
- `exile_this_spell` may come before effects that ask for a decision or pay, and before a `reflexive_trigger`: the
|
|
123
|
+
resolving frame keeps the spell as it last existed on the stack and it stands in for itself until it has resolved
|
|
124
|
+
(CR 608.2n; it raised `KeyError`). Snapshots and their validation keep it (`left_stack` in the resolve frame).
|
|
125
|
+
- `cost_modifier` `spells: {"subtypes": "chosen"}` reduces the cost of spells of the type chosen for the permanent
|
|
126
|
+
(CR 607.2d; it never applied).
|
|
127
|
+
- A granted mana ability's `{"tap": "granter"}` cost taps the granting permanent; affordability counts such abilities
|
|
128
|
+
as one source among all of them, and cancelling a payment untaps the granter (CR 602.2b, 607.1a, 734.1).
|
|
129
|
+
- A payment made irreversible by a mana ability (paying life, sacrificing) that can no longer be finished offers
|
|
130
|
+
`cancel` instead of no option at all: the cast is rewound (or the resolving payment counts as unpaid), the mana
|
|
131
|
+
abilities aren't (their sources stay tapped, their mana stays in the pool) and the mana spent goes back to the pool
|
|
132
|
+
(CR 734.1).
|
|
133
|
+
- A `one_of` in a mana ability's cost is refused when the card is loaded (it crashed when activated, CR 605.3a).
|
|
134
|
+
- "Target ... with mana value X" reads the X of the spell or ability being cast (CR 601.2b-c, 608.2b), not its
|
|
135
|
+
source's.
|
|
136
|
+
- Permanents put into graveyards by the same state-based-action check are one event batch for "one or more"
|
|
137
|
+
triggers (CR 603.2c, 704.3); before, each was its own batch. Combat damage of one step is named as one batch
|
|
138
|
+
explicitly (CR 510.2).
|
|
139
|
+
- `cost_modifier` `spells` with `"subtypes": "chosen"` now reads the source's choice (it never matched before).
|
|
140
|
+
- An additional trigger of a batched ability no longer shares its "that many" count with the original.
|
|
141
|
+
- `"self"` in a permanent's own leaves-the-battlefield trigger finds the card in the public zone it went to while
|
|
142
|
+
it's still there, so "when this dies, exile it / return it" works (CR 400.7e); amounts of `"self"` still read it
|
|
143
|
+
as it last existed.
|
|
144
|
+
- A token copy of a card counts as a token in `{"triggering": filter}` conditions (CR 111.1).
|
|
145
|
+
- A dies trigger of a permanent that was cast remembers how (`was_cast`, `cast_from` / `cast_with`, kicker, the
|
|
146
|
+
mana spent); `was_cast` and `cast_from` / `cast_with` also work as its intervening "if" (CR 400.7d, 603.4).
|
|
147
|
+
- `{"triggering": "object"}` names the permanent of a `becomes_untapped` trigger (CR 603.2).
|
|
148
|
+
- A reflexive trigger's `{"this_way": n}` reads its own effects' amounts, not the creating list's.
|
|
149
|
+
- Color identity counts the colors of a mana choice among some (`"color": "any_one", "colors": ["B", "G"]`), and
|
|
150
|
+
no longer counts mana of the chosen color (a fixed color gated by `"only_if": {"chosen": ...}`, CR 903.4).
|
|
151
|
+
- `RulesMonitor` reads a permanent's types, keywords and abilities from the engine's layers 1-6 (CR 613.1a-f)
|
|
152
|
+
instead of re-deriving them from the printed card, and recomputes only layer 7 and the rules that follow. No more
|
|
153
|
+
false findings for: statics matching a creature that "becomes a Bear in addition to its other types" (CR 205.1b,
|
|
154
|
+
613.4c); a creature an effect made only a land (CR 208.3); keyword counters (an indestructible counter, CR 122.1b,
|
|
155
|
+
704.5g); a copy's `except` keywords (haste on a token copy, CR 707.9b, 302.6); keywords an Aura granted before a
|
|
156
|
+
"loses all abilities" effect (timestamps, CR 613.7, 702.9b); extra land plays from a class level or a station symbol
|
|
157
|
+
(CR 305.2, 717.2a, 722.2a); "no maximum hand size" from an emblem (CR 114.4, 514.1). It also counts every
|
|
158
|
+
power/toughness counter (`-0/-1`, `+1/+0`, ..., CR 122.1a) and checks a `"-X"` loyalty ability against the X
|
|
159
|
+
announced (CR 606.4, 107.3).
|
|
160
|
+
- `Enjine::Verify` places a colorless land with a colored activated ability or cycling cost in a coverage deck whose
|
|
161
|
+
colors cover it, instead of failing to build one ("does not fit a … deck") and never exercising the land.
|
|
162
|
+
|
|
11
163
|
## [0.5.0] - 2026-11-24
|
|
12
164
|
|
|
13
165
|
### Added
|
|
@@ -164,7 +316,10 @@ Includes 0.4.0, which was tagged but never published to RubyGems.
|
|
|
164
316
|
- `enjine` CLI: hot-seat and random play, `--validate`, `--verify`,
|
|
165
317
|
`--random-deck`, save and load.
|
|
166
318
|
|
|
167
|
-
[Unreleased]: https://github.com/thisiscetin/enjine/compare/v0.
|
|
319
|
+
[Unreleased]: https://github.com/thisiscetin/enjine/compare/v0.6.1...HEAD
|
|
320
|
+
[0.6.1]: https://github.com/thisiscetin/enjine/compare/v0.6.0...v0.6.1
|
|
321
|
+
[0.6.0]: https://github.com/thisiscetin/enjine/compare/v0.5.0...v0.6.0
|
|
322
|
+
[0.5.0]: https://github.com/thisiscetin/enjine/compare/v0.4.1...v0.5.0
|
|
168
323
|
[0.4.1]: https://github.com/thisiscetin/enjine/compare/v0.4.0...v0.4.1
|
|
169
324
|
[0.4.0]: https://github.com/thisiscetin/enjine/compare/v0.3.0...v0.4.0
|
|
170
325
|
[0.3.0]: https://github.com/thisiscetin/enjine/compare/v0.2.0...v0.3.0
|
data/README.md
CHANGED
|
@@ -9,8 +9,10 @@ atomic decision with a list of legal options. That makes it a solid base for
|
|
|
9
9
|
simulations, bots and reinforcement learning, or for a game client.
|
|
10
10
|
|
|
11
11
|
**Scope: Standard.** Enjine implements the core rules and the mechanics of the
|
|
12
|
-
current Standard-legal sets
|
|
13
|
-
|
|
12
|
+
current Standard-legal sets, plus a growing set of older mechanics that real
|
|
13
|
+
decks ask for (face-down cards, persist and undying, ninjutsu, miracle, battles,
|
|
14
|
+
Rooms, Cases, ...). Mechanics nothing supports yet (madness, infect, mutate, ...)
|
|
15
|
+
are rejected at validation. The
|
|
14
16
|
[mechanics coverage](docs/MECHANICS_COVERAGE.md) page has the details and the
|
|
15
17
|
numbers. Games are constructed by default; two-player **Duel Commander** (CR 903)
|
|
16
18
|
is a `format:` away (`--format duel_commander` in the CLI).
|
|
@@ -29,7 +31,9 @@ is a `format:` away (`--format duel_commander` in the CLI).
|
|
|
29
31
|
omniscient observer view.
|
|
30
32
|
- **No runtime dependencies.** Plain Ruby 4.0.
|
|
31
33
|
|
|
32
|
-
> **Status: 0.1.**
|
|
34
|
+
> **Status: 0.6, pre-1.0.** The public API is described in the
|
|
35
|
+
> [API guide](docs/guides/api.md); minor versions may still change it (see
|
|
36
|
+
> [CHANGELOG.md](CHANGELOG.md)). Start there and with the
|
|
33
37
|
> [card DSL guide](docs/guides/card-data-format.md). Progress and what's pending
|
|
34
38
|
> are in [docs/plans/standard.md](docs/plans/standard.md).
|
|
35
39
|
|
|
@@ -175,6 +179,8 @@ bundle exec exe/enjine --verify my_cards/ # validate, then play-test them i
|
|
|
175
179
|
bundle exec rake # specs (with coverage gate + docs drift check) and RuboCop
|
|
176
180
|
bundle exec rake docs # regenerate SUPPORTED.md and docs/reference after changing a primitive
|
|
177
181
|
bundle exec rake fuzz[50,1] # 50 random games, invariants checked after every decision
|
|
182
|
+
bundle exec rake "fuzz[40,3,duel_commander]" # the same in Duel Commander
|
|
183
|
+
bundle exec ruby -Ilib script/determinism_digest.rb 80 tmp/a.txt # per-game digests; diff two runs around a speedup
|
|
178
184
|
bundle exec rake bench # games per second (benchmark-ips)
|
|
179
185
|
bundle exec rake profile # stackprof CPU profile
|
|
180
186
|
```
|
|
@@ -184,6 +190,9 @@ Every mechanic is tested at three levels:
|
|
|
184
190
|
- **Integration:** scenario boards built with a small DSL, then legal options, then a decision, then the resulting state and events.
|
|
185
191
|
- **End-to-end:** full 60-card games, scripted and fuzzed, with export/import round-trips.
|
|
186
192
|
|
|
193
|
+
Rules-monitored play (`Enjine::Verify`, `--verify`) reruns an independent check of
|
|
194
|
+
the layer system and state-based actions against every game it plays.
|
|
195
|
+
|
|
187
196
|
## Contributing
|
|
188
197
|
|
|
189
198
|
Contributions are welcome: see [CONTRIBUTING.md](CONTRIBUTING.md) and the
|
data/SUPPORTED.md
CHANGED
|
@@ -9,6 +9,7 @@ Rules version: Comprehensive Rules effective 2026-11-06.
|
|
|
9
9
|
| Name | Rules | Description |
|
|
10
10
|
| --- | --- | --- |
|
|
11
11
|
| [`artifact`](docs/reference/types.md#artifact) | 301.1 | A permanent cast at sorcery speed. |
|
|
12
|
+
| [`battle`](docs/reference/types.md#battle) | 310.1, 310.4, 310.5, 310.6, 310.7, 310.9, 120.3h, 704.5v, 205.3q | A permanent with a printed `defense`: it enters with that many defense counters. Each battle has a protector (a Siege's is an opponent of its controller, chosen as it enters); the protector's opponents can attack it and the protector can block for it. Damage dealt to it removes defense counters; with none left it's put into its owner's graveyard (unless it's the source of a triggered ability still waiting or on the stack). Every battle needs a battle type: siege (CR 205.3q). |
|
|
12
13
|
| [`creature`](docs/reference/types.md#creature) | 302.1, 302.4, 302.6, 307.1 | A permanent with power and toughness that can attack and block. Cast at sorcery speed. It can't attack or use {T} abilities unless controlled continuously since its controller's most recent turn began (summoning sickness). |
|
|
13
14
|
| [`enchantment`](docs/reference/types.md#enchantment) | 303.1 | A permanent cast at sorcery speed. |
|
|
14
15
|
| [`instant`](docs/reference/types.md#instant) | 304.1, 304.2, 608.2n | A spell cast any time its controller has priority. Its spell ability resolves, then it goes to the graveyard. |
|
|
@@ -35,6 +36,7 @@ Rules version: Comprehensive Rules effective 2026-11-06.
|
|
|
35
36
|
| [`mountain`](docs/reference/subtypes.md#mountain) | 305.6, 205.3i | Basic land type. A land with this subtype has "{T}: Add {R}." |
|
|
36
37
|
| [`plains`](docs/reference/subtypes.md#plains) | 305.6, 205.3i | Basic land type. A land with this subtype has "{T}: Add {W}." |
|
|
37
38
|
| [`saga`](docs/reference/subtypes.md#saga) | 715.3a, 715.3c, 505.4, 715.4, 704.5s | Enchantment type. A Saga enters with a lore counter; as its controller's precombat main phase begins, they put another lore counter on it. Each lore counter added can trigger its chapter abilities. Once its lore counters reach its final chapter number and no chapter ability of it is waiting to resolve, its controller sacrifices it. |
|
|
39
|
+
| [`siege`](docs/reference/subtypes.md#siege) | 310.12, 310.9, 712.10, 608.2g | Battle type. As it enters, an opponent of its controller becomes its protector. When the last defense counter is removed from it, its controller exiles it, then may cast it transformed (its back face) without paying its mana cost. |
|
|
38
40
|
| [`swamp`](docs/reference/subtypes.md#swamp) | 305.6, 205.3i | Basic land type. A land with this subtype has "{T}: Add {B}." |
|
|
39
41
|
|
|
40
42
|
## Keyword abilities
|
|
@@ -75,10 +77,12 @@ Rules version: Comprehensive Rules effective 2026-11-06.
|
|
|
75
77
|
| [`menace`](docs/reference/keywords.md#menace) | 702.111b | Can't be blocked except by two or more creatures. |
|
|
76
78
|
| [`must_be_blocked`](docs/reference/keywords.md#must_be_blocked) | 509.1c | Requirement: this attacking creature must be blocked if able. Declaring blockers can't finish while it is unblocked and a creature that could block it blocks nothing. |
|
|
77
79
|
| [`paradigm`](docs/reference/keywords.md#paradigm) | 702.192a, 707.12, 603.7, 608.2g | As this instant or sorcery finishes resolving: if it's the first time a spell you control with its name has resolved this game, at the beginning of each of your precombat main phases for the rest of the game you create a copy of the card in exile and may cast it without paying its mana cost. Then the spell is exiled. |
|
|
80
|
+
| [`persist`](docs/reference/keywords.md#persist) | 702.79a, 603.10a, 603.4 | When this permanent dies, if it had no -1/-1 counters on it, return it to the battlefield under its owner's control with a -1/-1 counter on it. |
|
|
78
81
|
| [`phasing`](docs/reference/keywords.md#phasing) | 702.26a, 702.26p, 502.1 | During each of its controller's untap steps, before they untap, it phases out if it's phased in (and phases in if it phased out under their control). |
|
|
79
82
|
| [`prowess`](docs/reference/keywords.md#prowess) | 702.108a | Whenever you cast a noncreature spell, this creature gets +1/+1 until end of turn. |
|
|
80
83
|
| [`reach`](docs/reference/keywords.md#reach) | 702.17b | Can block creatures with flying. |
|
|
81
84
|
| [`riot`](docs/reference/keywords.md#riot) | 702.136a, 702.136b, 614.12 | As this permanent enters, its controller chooses an additional +1/+1 counter or haste (an enter_choice: `{type: "option", option: "counter" | "haste"}`). Riot granted by a static ability ("Other Spiders you control have riot") is chosen as it enters too, and haste chosen this way stays if it later loses riot. |
|
|
85
|
+
| [`split_second`](docs/reference/keywords.md#split_second) | 702.61a, 702.61b, 702.61c | As long as this spell is on the stack, players can't cast spells or activate abilities that aren't mana abilities (mana abilities, special actions and triggered abilities still work). |
|
|
82
86
|
| [`start_your_engines`](docs/reference/keywords.md#start_your_engines) | 702.179a, 702.179b, 702.179c, 702.179d, 704.3 | If you control this permanent and have no speed, your speed becomes 1. Once you have speed, it increases by 1 (to at most 4) once on each of your turns when one or more opponents lose life. Pair with `max_speed` abilities and the `speed` amount. |
|
|
83
87
|
| [`station`](docs/reference/keywords.md#station) | 702.184a, 722.4 | An activated ability: tap another untapped creature you control to put charge counters equal to its power on this permanent. Sorcery speed. Pair with `station_symbol` abilities for what the counters unlock. |
|
|
84
88
|
| [`storied`](docs/reference/keywords.md#storied) | 702.195a, 702.195b, 702.195c | While you control this permanent, once you control three or more permanents that are artifacts, Sagas and/or legendary, you have an enduring story for the rest of the game (condition `{"designation": "enduring_story"}`). |
|
|
@@ -86,6 +90,7 @@ Rules version: Comprehensive Rules effective 2026-11-06.
|
|
|
86
90
|
| [`sunburst`](docs/reference/keywords.md#sunburst) | 702.44a, 702.44b | As this permanent enters from the stack as a resolving spell, it gets a +1/+1 counter (a creature) or a charge counter (otherwise) for each color of mana spent to cast it. |
|
|
87
91
|
| [`suspend`](docs/reference/keywords.md#suspend) | 702.62a, 702.62b | This card has suspend: while it's exiled with time counters, its owner removes one at the beginning of each of their upkeeps; when the last is removed they may play it without paying its mana cost (a creature spell gains haste). "Suspend N—cost" is the ability `suspend`. |
|
|
88
92
|
| [`trample`](docs/reference/keywords.md#trample) | 702.19b, 702.19e | Excess combat damage beyond lethal damage to its blockers can be assigned to the player or planeswalker it's attacking. |
|
|
93
|
+
| [`undying`](docs/reference/keywords.md#undying) | 702.93a, 603.10a, 603.4 | When this permanent dies, if it had no +1/+1 counters on it, return it to the battlefield under its owner's control with a +1/+1 counter on it. |
|
|
89
94
|
| [`vigilance`](docs/reference/keywords.md#vigilance) | 702.20b | Attacking doesn't cause this creature to tap. |
|
|
90
95
|
| [`wither`](docs/reference/keywords.md#wither) | 702.80a, 702.80c, 702.80d, 120.3d | Damage this source deals to creatures is dealt as that many -1/-1 counters instead of marked damage, put by its controller. |
|
|
91
96
|
|
|
@@ -102,7 +107,7 @@ Rules version: Comprehensive Rules effective 2026-11-06.
|
|
|
102
107
|
| [`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). |
|
|
103
108
|
| [`cant_be_targeted_by`](docs/reference/abilities.md#cant_be_targeted_by) | 115.4, 113.7, 702.11d | This permanent can't be the target of abilities its controller's opponents control whose source matches `abilities_from` (a card spec, e.g. {"types": ["artifact"]}). |
|
|
104
109
|
| [`cant_phase_in`](docs/reference/abilities.md#cant_phase_in) | 702.26a, 502.1, 604.1 | While this permanent is on the battlefield, permanents can't phase in. |
|
|
105
|
-
| [`cards_have`](docs/reference/abilities.md#cards_have) | 611.3a, 604.1, 118.9, 601.2b, 702.190a | While this permanent is on the battlefield, cards you own in `zone` (graveyard (default), hand or exile) matching `cards` have the keyword alternative cost `ability` (flashback, harmonize, mayhem, web_slinging or
|
|
110
|
+
| [`cards_have`](docs/reference/abilities.md#cards_have) | 611.3a, 604.1, 118.9, 601.2b, 702.190a | While this permanent is on the battlefield, cards you own in `zone` (graveyard (default), hand or exile) matching `cards` have the keyword alternative cost `ability` (flashback, harmonize, mayhem, web_slinging, sneak or miracle) and may be cast with it from that zone. Cast option `via: "alt:cards_have:<permanent>:<ref>"`. |
|
|
106
111
|
| [`cast_restriction`](docs/reference/abilities.md#cast_restriction) | 601.3, 101.2 | This card can be cast only while `only_if` (a condition, checked for the player who would cast it) holds, whatever lets them cast it. |
|
|
107
112
|
| [`chapter`](docs/reference/abilities.md#chapter) | 715.2, 715.2b, 715.2c, 715.2d, 122.6 | A Saga's chapter ability: triggers when lore counters put on it bring their number from below `chapter` to at least `chapter`. Its targets are chosen as it's put on the stack. A Saga's final chapter number is its greatest `chapter`. |
|
|
108
113
|
| [`choose_basic_land_type`](docs/reference/abilities.md#choose_basic_land_type) | 614.12, 305.6, 607.2d | As this permanent enters, its controller chooses a basic land type; filters with "subtypes": "chosen" and a static ability's `"subtypes": "chosen"` use it ("this land is the chosen type"). |
|
|
@@ -113,14 +118,16 @@ Rules version: Comprehensive Rules effective 2026-11-06.
|
|
|
113
118
|
| [`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. |
|
|
114
119
|
| [`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. |
|
|
115
120
|
| [`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. |
|
|
116
|
-
| [`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` and `
|
|
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). |
|
|
117
122
|
| [`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
|
+
| [`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". |
|
|
118
124
|
| [`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. |
|
|
119
|
-
| [`cycling`](docs/reference/abilities.md#cycling) | 702.29a, 702.29b, 702.29e, 702.29f, 113.6m, 602.2a | Cycling: pay `cost` and discard this card from your hand to draw a card. With `for` it is typecycling: instead search your library for a card matching `for`, reveal it, put it into your hand, then shuffle. |
|
|
125
|
+
| [`cycling`](docs/reference/abilities.md#cycling) | 702.29a, 702.29b, 702.29c, 702.29d, 702.29e, 702.29f, 113.6m, 602.2a, 107.3 | Cycling: pay `cost` and discard this card from your hand to draw a card. With `for` it is typecycling: instead search your library for a card matching `for`, reveal it, put it into your hand, then shuffle. `cost` is a mana cost string (it may hold {X}, announced as it's activated) or a list of costs (`[{"pay_life": 2}]`). "When you cycle this card" is a triggered ability with `zone: "graveyard"` and the trigger `{"cycles": {"self": true}}`; its X is the cycling ability's. |
|
|
120
126
|
| [`damage_replacement`](docs/reference/abilities.md#damage_replacement) | 614.1a, 614.5, 614.9, 616.1, 616.1e, 616.1f, 120.2b | While this permanent is on the battlefield, damage from sources in `by` to recipients in `to` (both optional; `combat`: combat | noncombat) is changed: `multiply` (2 = "double that damage"), `plus` an amount ("that much damage plus 1"), or `redirect` ("self" | "attached": dealt to this permanent or the one it's attached to instead). A scope is "self", "attached" or {"each": filter, "controller": you|opponent|any, "other": bool}; `each` is optional and players match too, so {"controller": "opponent"} is "an opponent or a permanent an opponent controls". Redirections apply first; when the order of the others changes the result, the affected player chooses it (a damage_order decision), else prevention, then multiplying, then adding. |
|
|
121
127
|
| [`damage_unpreventable`](docs/reference/abilities.md#damage_unpreventable) | 615.12 | While this permanent is on the battlefield, damage from sources in `by` to recipients in `to` (both optional; `combat`: combat | noncombat) can't be prevented: prevention effects don't reduce it and shields aren't used up. |
|
|
122
128
|
| [`destroy_replacement`](docs/reference/abilities.md#destroy_replacement) | 614.1a, 614.8, 701.8a, 701.21a, 704.5f, 704.5g, 704.5h | If a permanent matching `affects` would be destroyed (by an effect, lethal damage or deathtouch), instead: all its `remove_counters` counters are removed (if given) and, with `remove_damage: true`, all damage marked on it is removed. Sacrificing isn't destroying, and 0 toughness isn't either. |
|
|
123
129
|
| [`devour`](docs/reference/abilities.md#devour) | 702.82a, 702.82b, 702.82c, 614.12, 701.21a | Devour `amount`: as this permanent enters, you may sacrifice any number of permanents matching `each` (default "creature"; "land" for devour land) that you control, one at a time; it enters with `amount` +1/+1 counters for each. |
|
|
130
|
+
| [`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"}`). |
|
|
124
131
|
| [`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. |
|
|
125
132
|
| [`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). |
|
|
126
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. |
|
|
@@ -139,21 +146,28 @@ Rules version: Comprehensive Rules effective 2026-11-06.
|
|
|
139
146
|
| [`exile_if_dies`](docs/reference/abilities.md#exile_if_dies) | 614.1a, 700.4, 603.12, 607.2a | While this permanent is on the battlefield, a permanent matching `affects` that would be put into a graveyard from the battlefield is exiled instead; the card is "exiled with" this permanent (exiled_with). `then`: effects right after ("instead exile it and you gain 2 life"; a reflexive_trigger for "When you do, ..."), reading {"triggering": "object"} (the exiled card) and "player" (who controlled it). |
|
|
140
147
|
| [`firebending`](docs/reference/abilities.md#firebending) | 702.189a, 500.5 | Firebending `amount`: whenever this creature attacks, add that much {R}; you don't lose this mana as steps end until end of combat. |
|
|
141
148
|
| [`first_flips_win`](docs/reference/abilities.md#first_flips_win) | 705.3, 604.1 | The first time each turn its controller flips one or more coins, those coins come up heads and they win those flips. |
|
|
142
|
-
| [`flashback`](docs/reference/abilities.md#flashback) | 702.34a, 118.9, 601.2b, 601.2f, 601.2h | Flashback: you may cast this instant or sorcery card from your graveyard by paying `cost` rather than its mana cost; then it's exiled whenever it would leave the stack. `cost` is a mana cost string or a list of costs (`[{"mana": "{1}{U}"}, {"tap_permanents": {"count": 3}}]`). Cast option `via: "alt:<ref>"`. |
|
|
149
|
+
| [`flashback`](docs/reference/abilities.md#flashback) | 702.34a, 118.9, 118.6, 601.2b, 601.2f, 601.2h | Flashback: you may cast this instant or sorcery card from your graveyard by paying `cost` rather than its mana cost; then it's exiled whenever it would leave the stack. `cost` is a mana cost string or a list of costs (`[{"mana": "{1}{U}"}, {"tap_permanents": {"count": 3}}]`), or `"mana_cost"`: the card's own mana cost ("its flashback cost is equal to its mana cost", e.g. granted with `grant_ability`). Cast option `via: "alt:<ref>"`. |
|
|
143
150
|
| [`foretell`](docs/reference/abilities.md#foretell) | 702.143a, 702.143b, 702.143c, 116.2h, 406.3, 118.9, 601.2b, 601.2f, 601.2h | Foretell: during your turn, you may pay {2} and exile this card from your hand face down (special action `{type: "special_action"}`). After that turn you may cast it from exile by paying `cost` rather than its mana cost (cast option `via: "alt:<ref>"`). `{"cast_with": "foretell"}` reads it. |
|
|
144
151
|
| [`gift`](docs/reference/abilities.md#gift) | 702.174a, 702.174b, 702.174j, 702.174k, 702.174m, 601.2b | Gift: as you cast this spell you may promise a gift to an opponent you choose (the `choose_kicker` decision, then `choose_cost` for the opponent). `{"cast_with": "gift"}` holds if you did, and the selector "gift_recipient" is that player; write the gift as the spell's first effect (or an enters trigger) under that condition. |
|
|
145
152
|
| [`grants_beam_me_up`](docs/reference/abilities.md#grants_beam_me_up) | 702.196a, 702.196b, 604.1, 611.3a | While this permanent is on the battlefield, during your main phase each instant and sorcery card in your graveyard has beam me up with its mana cost as the beam me up cost; this permanent can't be the creature returned to cast a spell this way. Offered as a cast option with `via: "beam_granted:<permanent>:<ref>"`. |
|
|
146
153
|
| [`harmonize`](docs/reference/abilities.md#harmonize) | 702.180a, 702.180b, 118.9, 601.2b, 601.2f, 601.2h | Harmonize: you may cast this card from your graveyard by paying `cost` and tapping up to one untapped creature you control rather than its mana cost; the total cost is reduced by generic mana equal to that creature's power. Then it's exiled whenever it would leave the stack. The creature is a `choose_cost` decision (`{type: "cost"}` without an object taps none). Cast option `via: "alt:<ref>"`. |
|
|
147
154
|
| [`hexproof_from`](docs/reference/abilities.md#hexproof_from) | 702.11d, 702.11f, 702.11g, 115.4, 607.2d | Hexproof from the quality: this permanent can't be the target of spells with the quality, or abilities from sources with it, that its controller's opponents control. The quality is a card spec (`{"colors": ["B"]}`, `{"types": ["instant"]}`, `{"color_count": {"equal": 1}}` for monocolored), or "its_colors" (hexproof from each of its colors: whatever shares a color with it), or "chosen_color" (the chosen color; granted by `become`, the color chosen as it resolved). |
|
|
148
155
|
| [`hideaway`](docs/reference/abilities.md#hideaway) | 702.75a, 406.3, 607.2a | Hideaway `amount`: when this permanent enters, look at the top N cards of your library, exile one face down (linked: "exiled_with") and put the rest on the bottom in a random order. |
|
|
156
|
+
| [`impending`](docs/reference/abilities.md#impending) | 702.176a, 118.9, 601.2b, 601.2f, 601.2h, 613.1d, 613.6, 122.6 | Impending `amount`—`cost`: you may cast this card by paying `cost` rather than its mana cost. If you do, it enters with `amount` time counters, and while its impending cost was paid and it has a time counter on it, it isn't a creature. At the beginning of your end step, remove a time counter from it (a triggered ability that comes with the keyword). Cast option `via: "alt:<ref>"`; `{"cast_with": "impending"}` reads it. |
|
|
157
|
+
| [`infinity`](docs/reference/abilities.md#infinity) | 702.186a, 702.186b, 701.64b | An Infinity card's "∞ — [ability]": one static, triggered or activated ability that works only while this permanent is harnessed. Condition `{"harnessed": true}` reads the designation. |
|
|
149
158
|
| [`kicker`](docs/reference/abilities.md#kicker) | 702.33a, 702.33d, 702.33g, 601.2b, 601.2f, 601.2h | Kicker: as you cast this spell you may also pay `cost` (mana and/or chosen costs such as `sacrifice_permanent`). The spell is then kicked: `{"kicked": true}` conditions hold and its `kicked_targets` are used. |
|
|
159
|
+
| [`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). |
|
|
150
160
|
| [`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). |
|
|
151
161
|
| [`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. |
|
|
152
162
|
| [`mana`](docs/reference/abilities.md#mana) | 605.1a, 605.3a, 605.3b, 106.1a, 106.4, 106.6, 607.2d, 602.5b | 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." |
|
|
153
163
|
| [`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). |
|
|
154
164
|
| [`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). |
|
|
155
165
|
| [`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>"`. |
|
|
166
|
+
| [`miracle`](docs/reference/abilities.md#miracle) | 702.94a, 702.94b, 608.2g, 118.9, 601.2b, 601.2f, 601.2h, 121.2 | Miracle `cost`: when you draw this card as the first card you drew this turn, it's revealed and a triggered ability lets you cast it as that ability resolves by paying `cost` rather than its mana cost (an `effect_choice`: cast or done), if it's still in your hand. Never offered at priority. `cards_have` with `zone: "hand"` can give it to cards in your hand. |
|
|
156
167
|
| [`mobilize`](docs/reference/abilities.md#mobilize) | 702.181a, 508.4 | Mobilize `amount`: whenever this creature attacks, create that many 1/1 red Warrior creature tokens tapped and attacking; sacrifice them at the beginning of the next end step. |
|
|
168
|
+
| [`morph`](docs/reference/abilities.md#morph) | 702.37a, 702.37c, 702.37d, 702.37e, 708.2, 708.4, 708.8, 116.2b | Morph: you may cast this card face down as a nameless colorless 2/2 creature spell 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: "morph"}`); abilities about entering don't trigger then. |
|
|
169
|
+
| [`ninjutsu`](docs/reference/abilities.md#ninjutsu) | 702.49a, 702.49b, 702.49c, 509.1h, 506.3a, 113.6m, 602.2a | Ninjutsu: an activated ability from your hand: pay `cost`, reveal this card and return an unblocked attacking creature you control to its owner's hand (a `choose_cost` decision) to put this card onto the battlefield tapped and attacking what that creature was attacking. It isn't cast. Usable while you have an unblocked attacker (after blockers are declared). |
|
|
170
|
+
| [`offspring`](docs/reference/abilities.md#offspring) | 702.175a, 702.175b, 601.2b, 601.2f, 601.2h, 707.9b, 603.4 | Offspring: as you cast this spell you may also pay `cost` (announced with the `choose_kicker` decision; the spell isn't kicked). When the permanent enters, if its offspring cost was paid, create a 1/1 token copy of it (a triggered ability that comes with the keyword). `{"cast_with": "offspring"}` holds if it was paid. |
|
|
157
171
|
| [`play_from`](docs/reference/abilities.md#play_from) | 601.3, 113.6e, 113.6f, 305.1, 401.5, 122.1, 614.12, 400.11a, 400.11b, 108.3 | With `cards: "self"` (default): its owner may cast this card from `zone` (the ability functions there). With a card spec: while this permanent is on the battlefield, its controller may play their own matching cards from `zone`, or from any of `zones` ("outside": cards they own outside the game, the deck's `outside` list, CR 400.11a). `play`: "cast" (spells only, default) or "play" (lands too, using a land play). `once_each_turn`: once during each of your turns, one use shared by all its zones. `enters_with`: a permanent spell cast this way enters with these counters. Timing and costs are the usual ones. |
|
|
158
172
|
| [`player_rule`](docs/reference/abilities.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, 604.1, 604.2, 611.3a | While this permanent is on the battlefield (and its `if` condition holds), `rule` applies to the players in `affects` (you | opponents | each; default you). Rules: hexproof, cant_attack, no_max_hand_size, prevent_all_damage, cant_lose_for_life, cant_sacrifice, 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, cant_be_attacked. `cant_sacrifice` takes a `filter` of the permanents that can't be sacrificed, `cant_activate` may take a `filter` of the sources whose abilities can't be activated (mana abilities still can) or `name: "chosen"` (sources with the name this permanent chose, in any zone), `cant_be_attacked` takes a `filter` of the creatures that can't attack them, and `cant_cast` and `spells_cant_be_countered` may take a card spec of the `spells`. The damage rules apply to all damage whichever players they name. |
|
|
159
173
|
| [`plot`](docs/reference/abilities.md#plot) | 702.170a, 702.170b, 702.170d, 116.2k | Plot `cost`: during your main phase, while the stack is empty, you may pay `cost` and exile this card from your hand (special action `{type: "special_action"}`). It becomes plotted: on a later turn you may cast it from exile without paying its mana cost, during your main phase while the stack is empty (cast option `via: "plotted"`). |
|
|
@@ -161,18 +175,20 @@ Rules version: Comprehensive Rules effective 2026-11-06.
|
|
|
161
175
|
| [`protection_from`](docs/reference/abilities.md#protection_from) | 702.16a, 702.16b, 702.16c, 702.16d, 702.16e, 702.16f, 702.16g, 702.16h, 702.16i, 702.16j, 702.16k, 704.5m, 704.5n | Protection from the quality (a card spec, "everything", "each_opponent": from each of your opponents, or "its_colors"): damage from sources with the quality is prevented, and this permanent can't be enchanted or equipped by, blocked by or targeted by anything with the quality (Auras and Equipment already attached fall off as a state-based action). |
|
|
162
176
|
| [`saddle`](docs/reference/abilities.md#saddle) | 702.171a, 702.171b, 702.171c | Saddle 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 saddled until end of turn. Activate only as a sorcery. |
|
|
163
177
|
| [`sneak`](docs/reference/abilities.md#sneak) | 702.190a, 702.190b, 506.3a, 118.9, 601.2b, 601.2f, 601.2h | Sneak: any time you could cast an instant during your declare blockers step, you may cast this spell by paying `cost` and returning an unblocked attacking creature you control to its owner's hand rather than its mana cost. A permanent spell cast this way enters tapped and attacking what that creature was attacking. Cast option `via: "alt:<ref>"`. |
|
|
178
|
+
| [`solved`](docs/reference/abilities.md#solved) | 702.169a, 702.169b, 702.169c, 702.169d, 720.3b, 720.3c | A Case's "Solved — [ability]": one static, triggered or activated ability that works only while this permanent is solved (a static applies as long as it's solved, a triggered ability triggers only if it's solved, an activated ability can be activated only if it's solved). Condition `{"solved": true}` reads the designation. |
|
|
164
179
|
| [`spell`](docs/reference/abilities.md#spell) | 113.3a, 601.2c, 608.2b, 608.2c, 702.183a, 601.2f | The spell ability of an instant or sorcery: its targets are chosen while casting and its effects happen in order when it resolves. If every target is illegal on resolution, it doesn't resolve. A mode of a modal spell may have a `cost`: a mana cost paid in addition when that mode is chosen (tiered: "Choose one additional cost"). |
|
|
165
180
|
| [`spell_keywords`](docs/reference/abilities.md#spell_keywords) | 604.1, 611.3a, 702.85a | Spells you control on the stack matching `spells` (a spell filter; default every spell), cast `from` / `not_from` a zone if given, have the `keywords` (e.g. cascade, which then triggers as such a spell is cast). |
|
|
166
181
|
| [`spells_have`](docs/reference/abilities.md#spells_have) | 702.126a, 702.51a, 611.3a, 604.1 | Spells you cast matching the card spec `spells` (default: every spell) have `keywords` (convoke and/or improvise) while this permanent is on the battlefield. |
|
|
167
|
-
| [`static`](docs/reference/abilities.md#static) | 604.1, 604.2, 611.3a, 612.8, 613.1c, 613.1d, 613.1e, 613.1f, 613.4b, 613.4c, 613.7a, 613.8a, 205.1a, 205.1b, 301.5f, 303.4m | While its source is on the battlefield (and its `if` condition holds), every permanent it `affects` gets `pump` (fixed or computed amounts, layer 7c), the `keywords` and granted `abilities` (layer 6, triggered, activated or mana abilities), and with `creature_types` has exactly those creature types (layer 4); `loses_abilities: true` removes the abilities it had before (layer 6, in timestamp order: later grants and keyword counters stay, CR 613.7), `colors` sets its colors (layer 5) and `base_power_toughness` its base power and toughness (layer 7b); `types` are card types it has in addition to its other types ("this Vehicle is an artifact creature", layer 4) and `subtypes` subtypes it has in addition to its other types ("is a Wizard in addition to its other types", layer 4). `affects` is {"each": filter, "controller": you|opponent|any, "other": true} (relative to the source's controller), "self", or "attached" ("equipped/enchanted creature"). |
|
|
182
|
+
| [`static`](docs/reference/abilities.md#static) | 604.1, 604.2, 611.3a, 506.4, 612.8, 613.1c, 613.1d, 613.1e, 613.1f, 613.4b, 613.4c, 613.7a, 613.8a, 205.1a, 205.1b, 301.5f, 303.4m | While its source is on the battlefield (and its `if` condition holds), every permanent it `affects` gets `pump` (fixed or computed amounts, layer 7c), the `keywords` and granted `abilities` (layer 6, triggered, activated or mana abilities), and with `creature_types` has exactly those creature types (layer 4); `loses_abilities: true` removes the abilities it had before (layer 6, in timestamp order: later grants and keyword counters stay, CR 613.7), `colors` sets its colors (layer 5) and `base_power_toughness` its base power and toughness (layer 7b); `types` are card types it has in addition to its other types ("this Vehicle is an artifact creature", layer 4) and `subtypes` subtypes it has in addition to its other types ("is a Wizard in addition to its other types", layer 4). `affects` is {"each": filter, "controller": you|opponent|any, "other": true} (relative to the source's controller), "self", or "attached" ("equipped/enchanted creature"). The filter and the `if` condition may read combat and tapped status ("attacking creatures you control have first strike", {"if": {"attacking": "attached"}}), never power or toughness. |
|
|
168
183
|
| [`station_symbol`](docs/reference/abilities.md#station_symbol) | 722.2a, 722.2b, 722.2c, 613.1d, 613.4b | While this permanent has at least `at` charge counters it has `keywords` and `abilities`; with `power`/`toughness` it is also a creature with that base power and toughness (layers 4 and 7b). |
|
|
169
184
|
| [`suspend`](docs/reference/abilities.md#suspend) | 702.62a, 702.62c, 116.2f | Suspend `amount`—`cost`: whenever you could begin to cast this card from your hand, you may pay `cost` and exile it with `amount` time counters (special action `{type: "special_action"}`); then it works as the keyword `suspend`. |
|
|
170
185
|
| [`tapping_power`](docs/reference/abilities.md#tapping_power) | 702.122a, 702.171a, 702.184a, 702.184c | When this creature is tapped to pay the cost of the abilities in `for` (crew, saddle, station), it counts its `use` (power, default; toughness; toughness_if_greater: its toughness when that's greater than its power) plus `plus`. Several of them add up their `plus`. A `static` can grant it. |
|
|
171
186
|
| [`teamwork`](docs/reference/abilities.md#teamwork) | 702.194a, 702.194b, 702.194c, 601.2b, 601.2f, 601.2h | Teamwork N: as you cast this spell you may also tap any number of untapped creatures you control with total power N or more (the `choose_kicker` decision, then one `choose_cost` per creature). `{"cast_with": "teamwork"}` holds if you did; `kicked_targets` are its targets then. |
|
|
187
|
+
| [`to_solve`](docs/reference/abilities.md#to_solve) | 720.3a, 720.3b, 603.4 | A Case's "To solve — [condition]": at the beginning of your end step, if the condition holds and this Case isn't solved, it becomes solved (an intervening-if triggered ability). The parameter is the condition itself. |
|
|
172
188
|
| [`token_replacement`](docs/reference/abilities.md#token_replacement) | 614.1a, 614.16, 111.1, 616.1 | If tokens would be created under this permanent's controller's control, that many `token` tokens are created instead (tapped or attacking if the originals would be). `token` is a predefined token name or inline card data. |
|
|
173
189
|
| [`triggered`](docs/reference/abilities.md#triggered) | 603.2, 603.3, 603.3b, 603.3d | A triggered ability: when its trigger condition happens, it is put on the stack the next time a player would receive priority (in APNAP order), with targets chosen then. |
|
|
174
190
|
| [`ward`](docs/reference/abilities.md#ward) | 702.21a, 601.2c, 603.2, 701.6a, 701.67a | Ward: whenever this permanent becomes the target of a spell or ability an opponent controls, counter that spell or ability unless its controller pays `cost`: a mana cost, or a list of costs ("Ward—Pay 2 life", "Ward—Discard a card or pay {2}" with `one_of`). With `waterbend`, they waterbend that cost: "Ward—Waterbend {4}". |
|
|
175
|
-
| [`warp`](docs/reference/abilities.md#warp) | 702.185a, 702.185b, 702.185c, 603.7, 118.9, 601.2b, 601.2f, 601.2h | Warp: you may cast this card from your hand by paying `cost` rather than its mana cost. If you do, the permanent it becomes is exiled at the beginning of the next end step (a delayed triggered ability), and its owner may cast it from exile after this turn has ended for as long as it remains exiled (cast option `via: "warped"`). Conditions `{"cast_with": "warp"}` and `{"cast_with_this_turn": "warp"}` read it. |
|
|
191
|
+
| [`warp`](docs/reference/abilities.md#warp) | 702.185a, 702.185b, 702.185c, 603.7, 118.9, 601.2b, 601.2f, 601.2h, 601.3 | Warp: you may cast this card from your hand by paying `cost` rather than its mana cost. If you do, the permanent it becomes is exiled at the beginning of the next end step (a delayed triggered ability), and its owner may cast it from exile after this turn has ended for as long as it remains exiled (cast option `via: "warped"`). Conditions `{"cast_with": "warp"}` and `{"cast_with_this_turn": "warp"}` read it. `from: ["hand", "graveyard"]`: "you may cast this card from your graveyard using its warp ability" (CR 601.3). |
|
|
176
192
|
| [`web_slinging`](docs/reference/abilities.md#web_slinging) | 702.188a, 118.9, 601.2b, 601.2f, 601.2h | Web-slinging: you may cast this spell by paying `cost` and returning a tapped creature you control to its owner's hand rather than its mana cost. The creature is a `choose_cost` decision, returned as the spell becomes cast. Cast option `via: "alt:<ref>"`. |
|
|
177
193
|
|
|
178
194
|
## Trigger conditions
|
|
@@ -193,16 +209,17 @@ Rules version: Comprehensive Rules effective 2026-11-06.
|
|
|
193
209
|
| [`becomes_untapped`](docs/reference/triggers.md#becomes_untapped) | 603.2e, 701.26b | The subject becomes untapped (in the untap step or by an effect). A permanent that enters untapped doesn't become untapped. |
|
|
194
210
|
| [`blocks`](docs/reference/triggers.md#blocks) | 509.3a, 509.3b, 509.3f, 603.2 | The subject is declared as a blocker. With `blocking`, only when the attacking creature it blocks matches that filter ("blocks a creature with flying"). {"triggering": "object"} is the blocking creature. |
|
|
195
211
|
| [`cast`](docs/reference/triggers.md#cast) | 603.2, 601.2i, 113.6, 202.3e, 201.4, 607.2, 115.1, 601.2a, 601.2c, 108.3 | A player casts a spell. `controller`: you (default) | opponent | any; `spell`: creature | noncreature | instant_or_sorcery, or any spell filter, e.g. {"spell": {"subtypes": ["saga"]}} or {"one_of": [...]} for "creature or Spacecraft spell"; `name` / `mana_value`: "chosen" (the source's as-it-entered choice); `self: true`: "when you cast this spell" (it functions on the stack). `targets`: only a spell that targets something matching this filter ("self": this permanent), e.g. {"creature": {"controller": "you"}}. `from` / `not_from`: only a spell cast from (not from) that zone: hand | graveyard | exile | library | outside. `single_target: true`: only a spell with exactly one target. `owner`: "not_you" only a spell you don't own, "you" only one you own. |
|
|
212
|
+
| [`commits_crime`](docs/reference/triggers.md#commits_crime) | 700.13, 603.2 | A player commits a crime: they cast a spell, activate an ability or put a triggered ability on the stack that targets an opponent, a permanent, spell or ability an opponent controls, or a card in an opponent's graveyard (once per spell or ability). `controller`: you (default) | opponent | any. {"triggering": "object"} is that spell or ability. Amount `{"crimes_this_turn": player}` counts them. |
|
|
196
213
|
| [`counters_placed`](docs/reference/triggers.md#counters_placed) | 122.6, 603.2, 603.2c | One or more counters (only `counter`, if given) are put on the subject, including the counters it enters the battlefield with. Triggers once per event, however many counters. `nth` (needs `counter`): only when the Nth such counter is put on it (the event that takes it from fewer than N to N or more). |
|
|
197
214
|
| [`crews_vehicle`](docs/reference/triggers.md#crews_vehicle) | 702.122b, 603.2 | The subject (a creature) crews a Vehicle: it's tapped to pay that Vehicle's crew cost. {"triggering": "object"} is the Vehicle. |
|
|
198
|
-
| [`cycles`](docs/reference/triggers.md#cycles) | 702.29a, 702.29e | A player (`controller`: you (default) | opponent | any) cycles a card (activates its cycling or typecycling ability; optional `card` filter). |
|
|
199
|
-
| [`deals_damage`](docs/reference/triggers.md#deals_damage) | 510.2, 603.2, 603.2c, 120.2a, 120.2b, 120.3 | The subject deals damage. `combat: true` only counts combat damage, `noncombat: true` only noncombat damage; `to`: player | opponent (
|
|
215
|
+
| [`cycles`](docs/reference/triggers.md#cycles) | 702.29a, 702.29c, 702.29e, 113.6k | A player (`controller`: you (default) | opponent | any) cycles a card (activates its cycling or typecycling ability; optional `card` filter). `self: true`: "when you cycle this card", an ability of the card with `zone: "graveyard"` (where the cycled card is); its X is the cycling ability's X. |
|
|
216
|
+
| [`deals_damage`](docs/reference/triggers.md#deals_damage) | 510.2, 603.2, 603.2c, 120.2a, 120.2b, 120.3 | The subject deals damage. `combat: true` only counts combat damage, `noncombat: true` only noncombat damage; `to`: player | opponent | you (players, relative to the source's controller) | creature | planeswalker | battle | permanent | any (default), or a list of them ("a player or planeswalker"). Triggers once per damage event (each combat damage step is one, so double strike can trigger twice). `batched: true`: "one or more ... deal damage", once per event batch (a combat damage step); then {"triggering": "objects"} are the sources that dealt it and {"triggering": "amount"} the number of damage events. |
|
|
200
217
|
| [`dealt_damage`](docs/reference/triggers.md#dealt_damage) | 120.3, 603.2, 603.2c, 120.2a, 120.2b | Damage is dealt to the `subject` (a permanent: "self" by default, "attached" or {"each": filter, ...}) or, with `player` (you | opponent | any), to a player. `combat` / `noncombat`: only that damage. {"triggering": "object"} is the permanent dealt damage, {"triggering": "player"} the player, {"triggering": "amount"} how much. `batched: true`: "one or more ..." (once per damage event, CR 603.2c). |
|
|
201
|
-
| [`dies`](docs/reference/triggers.md#dies) | 603.6c, 603.10a, 700.4 | The subject is put into a graveyard from the battlefield. Looks back in time (CR 603.10a). |
|
|
218
|
+
| [`dies`](docs/reference/triggers.md#dies) | 603.6c, 603.10a, 700.4, 603.2c | The subject is put into a graveyard from the battlefield. Looks back in time (CR 603.10a). `batched: true`: "whenever one or more ... die", once per event batch (creatures dying at the same time, e.g. to lethal combat damage); {"triggering": "objects"} are the cards put into graveyards and {"triggering": "amount"} how many. |
|
|
202
219
|
| [`discards`](docs/reference/triggers.md#discards) | 701.9a, 603.2c, 702.29d | A player (`controller`: you (default) | opponent | any) discards a card (optional `card` filter). `batched: true`: "one or more cards", once per event batch; then "that many" is how many were discarded. |
|
|
203
220
|
| [`draws`](docs/reference/triggers.md#draws) | 121.1, 121.2 | A player draws a card; triggers once per card (draws happen one at a time). `controller`: you (default) | opponent | any. |
|
|
204
221
|
| [`earthbends`](docs/reference/triggers.md#earthbends) | 701.66b | A player (`controller`: you (default) | opponent | any) earthbends. |
|
|
205
|
-
| [`enters`](docs/reference/triggers.md#enters) | 603.6a, 603.2, 614.12 | The subject enters the battlefield. `untapped: true`: only if it entered untapped. `from`: only if it entered from that zone ("enters from exile"). |
|
|
222
|
+
| [`enters`](docs/reference/triggers.md#enters) | 603.6a, 603.2, 603.2c, 614.12 | The subject enters the battlefield. `untapped: true`: only if it entered untapped. `from`: only if it entered from that zone ("enters from exile"). `batched: true`: "whenever one or more ... enter", once per event batch; {"triggering": "objects"} are the permanents that entered and {"triggering": "amount"} how many. |
|
|
206
223
|
| [`faces_dilemma`](docs/reference/triggers.md#faces_dilemma) | 700.17, 700.2, 601.2b, 603.3c | A player faces a dilemma: they chose one or more modes for a spell or ability (cast, activated, or a triggered ability put on the stack). `controller`: you (default) | opponent | any. CR 700.17. |
|
|
207
224
|
| [`firebends`](docs/reference/triggers.md#firebends) | 702.189b | A player (`controller`: you (default) | opponent | any) firebends. |
|
|
208
225
|
| [`gains_life`](docs/reference/triggers.md#gains_life) | 119.9, 120.3f | A player gains life (once per life gain event; lifelink combat damage is one event per source). `controller`: you (default) | opponent | any. |
|
|
@@ -219,6 +236,8 @@ Rules version: Comprehensive Rules effective 2026-11-06.
|
|
|
219
236
|
| [`step_begins`](docs/reference/triggers.md#step_begins) | 603.6b, 503.1a, 513.1a | A step begins. `whose`: "your" (default), "each" or "opponent". |
|
|
220
237
|
| [`surveils`](docs/reference/triggers.md#surveils) | 701.25a, 701.25c, 701.25d | A player (`controller`: you (default) | opponent | any) surveils (not surveil 0). Triggers after the surveil is complete. |
|
|
221
238
|
| [`transforms`](docs/reference/triggers.md#transforms) | 701.27f, 603.2 | The subject transforms. For the default subject (this permanent), the ability is on the face that's up afterward, so it means "whenever this transforms into [this face]". |
|
|
239
|
+
| [`turned_face_up`](docs/reference/triggers.md#turned_face_up) | 708.8, 702.37e, 702.168d, 603.2 | The subject (default this permanent) is turned face up. On a card with morph, disguise or that can be manifested, it's "when this creature is turned face up". |
|
|
240
|
+
| [`unlocks_door`](docs/reference/triggers.md#unlocks_door) | 709.5h, 709.5i, 709.5j, 603.2 | A Room permanent (the subject, default this one) gets an unlocked designation. On a Room's door, `{}` means "when you unlock this door". `door`: left | right | any; `fully: true`: only when it now has both doors unlocked ("whenever you fully unlock a Room"). |
|
|
222
241
|
| [`waterbends`](docs/reference/triggers.md#waterbends) | 701.67c | A player (`controller`: you (default) | opponent | any) waterbends. |
|
|
223
242
|
|
|
224
243
|
## Costs
|
|
@@ -229,11 +248,13 @@ Rules version: Comprehensive Rules effective 2026-11-06.
|
|
|
229
248
|
| [`blight`](docs/reference/costs.md#blight) | 701.68a, 701.68b, 601.2h, 602.2b, 118.3 | Blight `amount`: put that many -1/-1 counters on a creature you control, chosen while casting or activating and put on it as it becomes cast. |
|
|
230
249
|
| [`bottom_self_from_graveyard`](docs/reference/costs.md#bottom_self_from_graveyard) | 401.1, 113.6m, 602.2b, 118.3 | Put this card from your graveyard on the bottom of your library. An ability with this cost is activated from your graveyard. |
|
|
231
250
|
| [`choose_creature_type`](docs/reference/costs.md#choose_creature_type) | 601.2b, 205.3m, 607.2d | Choose a creature type as part of the cost (a `choose_cost` decision with options `{type: "cost", creature_type: t}`). The spell remembers it as its chosen type: later costs and its effects read it with `"subtypes": "chosen"`. |
|
|
251
|
+
| [`collect_evidence`](docs/reference/costs.md#collect_evidence) | 701.59a, 701.59b, 701.59c, 202.3, 601.2h, 118.3 | Collect evidence `N`: exile any number of other cards from your graveyard with total mana value N or greater, chosen one at a time (`choose_cost`; `done` once they total N). Not payable without that much mana value in your graveyard. "If evidence was collected": make it an optional `additional_cost` and read `{"cast_with": "additional_cost"}`. |
|
|
232
252
|
| [`discard`](docs/reference/costs.md#discard) | 701.9a, 701.9b, 601.2h, 602.2b, 118.3 | Discard `count` cards (default 1) from your hand, never this card, matching the card spec `card` if given: chosen while casting or activating and discarded as the spell or ability becomes cast. `random: true` discards them at random instead. |
|
|
233
253
|
| [`discard_self`](docs/reference/costs.md#discard_self) | 701.9a, 602.2b, 113.6m, 118.3 | Discard the card the ability belongs to (it goes from your hand to your graveyard). An ability with this cost is activated from your hand. |
|
|
234
254
|
| [`exert`](docs/reference/costs.md#exert) | 701.43a, 701.43b, 701.43c | Exert this permanent: it doesn't untap during your next untap step. |
|
|
235
255
|
| [`exile_from_graveyard`](docs/reference/costs.md#exile_from_graveyard) | 406.1, 601.2h, 602.2b, 118.3 | Exile `count` cards from your graveyard (default 1), never this card, chosen while casting or activating and exiled as the spell or ability becomes cast. `card` (a card spec) restricts which. |
|
|
236
256
|
| [`exile_from_hand`](docs/reference/costs.md#exile_from_hand) | 406.1, 601.2h, 602.2b, 118.3 | Exile `count` cards from your hand (default 1), chosen while casting or activating, exiled as the spell or ability becomes cast. `card` (a card spec) restricts which. |
|
|
257
|
+
| [`exile_permanent`](docs/reference/costs.md#exile_permanent) | 406.1, 601.2h, 602.2b, 118.3, 608.2h | Exile `count` permanents you control matching `filter` (`other: true`: not the source). Chosen while casting or activating, exiled as it becomes cast; the exiled cards are `exiled_for_cost`, and their last known power, toughness and mana value are amount `sacrificed`. |
|
|
237
258
|
| [`exile_self`](docs/reference/costs.md#exile_self) | 406.1, 602.2b, 118.3 | Exile the permanent the ability belongs to ("Exile this enchantment: ..."). |
|
|
238
259
|
| [`exile_self_from_graveyard`](docs/reference/costs.md#exile_self_from_graveyard) | 406.1, 113.6m, 602.2b, 118.3 | Exile this card from your graveyard. An ability with this cost is activated from your graveyard. |
|
|
239
260
|
| [`get_counters`](docs/reference/costs.md#get_counters) | 118.1, 122.1, 704.5c | You get `amount` counters of the kind `counter` (e.g. poison). It can always be paid. |
|
|
@@ -273,11 +294,12 @@ Rules version: Comprehensive Rules effective 2026-11-06.
|
|
|
273
294
|
| [`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. |
|
|
274
295
|
| [`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. |
|
|
275
296
|
| [`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". |
|
|
276
|
-
| [`choose_cards`](docs/reference/effects.md#choose_cards) | 701.20a, 701.20e, 400.7j, 608.2c, 607.2a, 118.12, 701.9a, 701.9b | You choose `count` (default 1; "any": any number) 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. |
|
|
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. |
|
|
277
298
|
| [`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". |
|
|
278
299
|
| [`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". |
|
|
279
300
|
| [`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. |
|
|
280
301
|
| [`choose_option`](docs/reference/effects.md#choose_option) | 607.2f, 608.2c | The player (`to`, default you) chooses one of the `options` (words); later effects of this spell or ability check it with the condition {"chosen": word}. |
|
|
302
|
+
| [`cloak`](docs/reference/effects.md#cloak) | 701.58a, 701.58b, 701.58e, 701.58f, 701.58g, 708.2, 708.3 | Each referenced player (default you) cloaks the top card of their library `amount` times (default 1): it enters face down as a nameless colorless 2/2 creature with ward {2}. Its controller may turn it face up for its mana cost if it's a creature card. |
|
|
281
303
|
| [`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. |
|
|
282
304
|
| [`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). |
|
|
283
305
|
| [`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"). |
|
|
@@ -290,7 +312,7 @@ Rules version: Comprehensive Rules effective 2026-11-06.
|
|
|
290
312
|
| [`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. |
|
|
291
313
|
| [`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. |
|
|
292
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). |
|
|
293
|
-
| [`delayed_trigger`](docs/reference/effects.md#delayed_trigger) | 603.7a, 603.7b, 603.7c, 603.7d, 603.7e | 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; those objects are affected only if they are still where they were put. |
|
|
315
|
+
| [`delayed_trigger`](docs/reference/effects.md#delayed_trigger) | 603.7a, 603.7b, 603.7c, 603.7d, 603.7e | 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. |
|
|
294
316
|
| [`destroy`](docs/reference/effects.md#destroy) | 701.8a | Destroy each referenced permanent (it goes to its owner's graveyard). |
|
|
295
317
|
| [`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). |
|
|
296
318
|
| [`discard`](docs/reference/effects.md#discard) | 701.9a, 701.9b | Each referenced player discards `amount` cards of their choice (default: you). `random: true`: the cards are chosen at random (the game's random number generator), with no decision. `hand: true`: each discards their whole hand at once ("discard your hand"; how many is its amount {"this_way": n}). |
|
|
@@ -317,10 +339,13 @@ Rules version: Comprehensive Rules effective 2026-11-06.
|
|
|
317
339
|
| [`gain_life`](docs/reference/effects.md#gain_life) | 119.3 | Each referenced player gains `amount` life (default: you). |
|
|
318
340
|
| [`grant`](docs/reference/effects.md#grant) | 611.2a, 611.2c, 613.1f, 514.2, 500.1 | Each referenced permanent (or spell on the stack) gains the `keywords` until end of turn (`duration: "until_your_next_turn"`: until its controller's next turn begins). |
|
|
319
341
|
| [`grant_ability`](docs/reference/effects.md#grant_ability) | 113.6b, 611.2a, 613.1f | Each referenced object (a permanent, or a card in any zone, e.g. an exiled card) gains `ability` (any ability entry) for as long as it stays in its zone (default) or until end of turn. `for` (a card spec) keeps only matching objects ("that nonland card"). An activated ability with `zone` works from that zone ("activate only if this card is exiled"). |
|
|
342
|
+
| [`harness`](docs/reference/effects.md#harness) | 701.64a, 701.64b | Each referenced permanent (default: this one) becomes harnessed if it isn't (a designation it keeps until it leaves the battlefield). Its `infinity` abilities work while it is. |
|
|
320
343
|
| [`look_at_hand`](docs/reference/effects.md#look_at_hand) | 701.20e | You look at each referenced player's hand (other players don't see the cards). |
|
|
321
344
|
| [`lose_game`](docs/reference/effects.md#lose_game) | 104.3e, 104.4a | Each referenced player (default you) loses the game. |
|
|
322
345
|
| [`lose_life`](docs/reference/effects.md#lose_life) | 119.3 | Each referenced player loses `amount` life. The life lost is recorded for {"this_way": n}. |
|
|
323
|
-
| [`
|
|
346
|
+
| [`manifest`](docs/reference/effects.md#manifest) | 701.40a, 701.40b, 701.40e, 701.40f, 701.40g, 708.2, 708.3 | Each referenced player (default you) manifests the top card of their library `amount` times (default 1): it enters face down as a nameless colorless 2/2 creature with no abilities. Its controller may turn it face up for its mana cost if it's a creature card (special action `turn_face_up`). The new permanents are this effect's results. |
|
|
347
|
+
| [`manifest_dread`](docs/reference/effects.md#manifest_dread) | 701.62a, 701.62b, 701.40a, 701.20e | Each referenced player (default you) manifests dread: looks at the top two cards of their library, manifests one of them (decision `effect_choice`) and puts the other into their graveyard. Triggers on it (`keyword_action` "manifest_dread") see it after it's complete. |
|
|
348
|
+
| [`may`](docs/reference/effects.md#may) | 118.12, 118.3, 608.2d, 608.2e | An optional effect. The controller chooses yes or no as it resolves; yes is offered only if every effect in `effects` can be done fully. On yes, `effects` then `then` ("if you do") happen; on no, `otherwise` ("if you don't"). Nested effects may name the results of earlier effects of the enclosing list ({"result": n} with n below this effect's position) and their own, numbered on from there: `effects` then `then` in one numbering, `otherwise` in its own ("if you do, ... the creature sacrificed this way"). |
|
|
324
349
|
| [`meld`](docs/reference/effects.md#meld) | 701.42a, 701.42b, 701.42c, 713.1a, 713.6, 713.8 | Exile this permanent and a creature named `with` that you both own and control, then meld them: a meld pair (cards with layout "meld" sharing a back face) enters the battlefield as one permanent with that back face up. When it leaves the battlefield, both cards go to the new zone. |
|
|
325
350
|
| [`mill`](docs/reference/effects.md#mill) | 701.17a | Each referenced player puts the top `amount` cards of their library into their graveyard (default: you). |
|
|
326
351
|
| [`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`. |
|
|
@@ -334,9 +359,9 @@ Rules version: Comprehensive Rules effective 2026-11-06.
|
|
|
334
359
|
| [`pump`](docs/reference/effects.md#pump) | 611.2a, 611.2c, 613.4c, 514.2, 500.1 | Each referenced creature gets +power/+toughness until end of turn (`duration: "until_your_next_turn"`: until its controller's next turn begins). The set of affected creatures is locked in when the effect starts. |
|
|
335
360
|
| [`put_in_library`](docs/reference/effects.md#put_in_library) | 401.4, 400.7, 608.2b | Put each referenced permanent, or card in a graveyard or exile, into its owner's library: on the `top` or `bottom`, or (`owner_choice`) where its owner chooses. |
|
|
336
361
|
| [`recruit`](docs/reference/effects.md#recruit) | 701.70a | Each referenced player (default: you) recruits: draws a card, then discards a card; if a nonland card was discarded, they create a 1/1 white Human Soldier creature token. |
|
|
337
|
-
| [`reflexive_trigger`](docs/reference/effects.md#reflexive_trigger) | 603.12, 603.12a, 603.7d, 603.7e, 603.3d | Creates a reflexive triggered ability ("when you do, ...") that triggers immediately, with the controller and source of the resolving spell or ability. Its `targets` are chosen as it's put on the stack; its `effects` may name the results of earlier effects of the creating list. With `if`, it triggers only when the condition holds ("when excess damage is dealt this way"). |
|
|
338
|
-
| [`remove_all_counters`](docs/reference/effects.md#remove_all_counters) | 122.8 | Remove every counter named `counter` (every counter, if no `counter` is given) from each referenced permanent. |
|
|
339
|
-
| [`remove_counters`](docs/reference/effects.md#remove_counters) | 122.8 | Remove up to `amount` counters named `counter` from each referenced permanent. How many were removed is {"this_way": n} ("remove a bait counter ... If you do, ..."). |
|
|
362
|
+
| [`reflexive_trigger`](docs/reference/effects.md#reflexive_trigger) | 603.12, 603.12a, 603.7d, 603.7e, 603.3d | Creates a reflexive triggered ability ("when you do, ...") that triggers immediately, with the controller and source of the resolving spell or ability. Its `targets` are chosen as it's put on the stack; its `effects` may name the results of earlier effects of the creating list ({"result": n} / {"this_way": n} with n below its position) and their own, numbered on from there. With `if`, it triggers only when the condition holds ("when excess damage is dealt this way"). |
|
|
363
|
+
| [`remove_all_counters`](docs/reference/effects.md#remove_all_counters) | 122.8, 122.1 | Remove every counter named `counter` (every counter, if no `counter` is given) from each referenced permanent or player ("you lose all poison counters"). |
|
|
364
|
+
| [`remove_counters`](docs/reference/effects.md#remove_counters) | 122.8, 122.1 | Remove up to `amount` counters named `counter` from each referenced permanent or player (poison, experience, ...). How many were removed is {"this_way": n} ("remove a bait counter ... If you do, ..."). |
|
|
340
365
|
| [`remove_damage`](docs/reference/effects.md#remove_damage) | 120.6, 514.2 | Remove all damage marked on each referenced permanent. |
|
|
341
366
|
| [`repeat`](docs/reference/effects.md#repeat) | 608.2c, 400.7j, 104.4b | Run `effects`, then run them again for as long as `while` (a condition) holds after a pass ("if the exiled card is a land card, repeat this process"). {"result": n} in the list and in `while` names what effect n did during the current pass. At most 100 passes. |
|
|
342
367
|
| [`return_choice`](docs/reference/effects.md#return_choice) | 101.4, 400.7, 608.2c | Each referenced player (default: you) returns `count` (default 1; "any": any number) permanents they control matching `filter` to their owners' hands, chosen by them in turn order starting with the active player (not targeted); all move at once. |
|
|
@@ -354,6 +379,7 @@ Rules version: Comprehensive Rules effective 2026-11-06.
|
|
|
354
379
|
| [`shuffle_into_library`](docs/reference/effects.md#shuffle_into_library) | 701.24a, 701.24c | Put each referenced card (in a graveyard or exile) or permanent into its owner's library; each of those owners shuffles their library. |
|
|
355
380
|
| [`shuffle_library`](docs/reference/effects.md#shuffle_library) | 701.24a | Each referenced player shuffles their library (default: you). |
|
|
356
381
|
| [`skip_turns`](docs/reference/effects.md#skip_turns) | 614.1b, 614.10, 614.10a | Each referenced player skips their next `amount` turns (extra turns included): each of those turns doesn't happen, and the next player in turn order takes theirs. Several skips add up. |
|
|
382
|
+
| [`solve`](docs/reference/effects.md#solve) | 720.3a, 720.3b | Each referenced permanent (default: this one) becomes solved if it isn't (a designation it keeps until it leaves the battlefield). Usually written through `to_solve`. |
|
|
357
383
|
| [`surveil`](docs/reference/effects.md#surveil) | 701.25a | Look at the top `amount` cards of your library; put any number into your graveyard and the rest on top in any order. |
|
|
358
384
|
| [`suspend`](docs/reference/effects.md#suspend) | 702.62a, 702.62b, 406.1 | Exile each referenced card or spell with `amount` time counters on it; if it doesn't have suspend, it gains suspend (keyword `suspend`) while it stays exiled. |
|
|
359
385
|
| [`tap`](docs/reference/effects.md#tap) | 701.26a | Tap each referenced permanent. |
|
|
@@ -366,8 +392,9 @@ Rules version: Comprehensive Rules effective 2026-11-06.
|
|
|
366
392
|
|
|
367
393
|
| Name | Rules | Description |
|
|
368
394
|
| --- | --- | --- |
|
|
369
|
-
| [`any_target`](docs/reference/filters.md#any_target) | 115.4 | A creature, player
|
|
395
|
+
| [`any_target`](docs/reference/filters.md#any_target) | 115.4 | A creature, player, planeswalker or battle. |
|
|
370
396
|
| [`artifact`](docs/reference/filters.md#artifact) | 115.1 | An artifact on the battlefield. |
|
|
397
|
+
| [`battle`](docs/reference/filters.md#battle) | 310.5 | A battle on the battlefield. |
|
|
371
398
|
| [`creature`](docs/reference/filters.md#creature) | 115.1 | A creature on the battlefield. |
|
|
372
399
|
| [`creature_or_planeswalker`](docs/reference/filters.md#creature_or_planeswalker) | 115.1 | A creature or planeswalker on the battlefield. |
|
|
373
400
|
| [`exiled_with`](docs/reference/filters.md#exiled_with) | 607.2a, 406.6, 115.1 | A card in exile that one of this object's abilities exiled (linked abilities: "the cards exiled with it"); restrict with `any_of`/`not` for its card types. |
|