Page 1 of 1

confirm]Rules change:continuous changes override etb replace

PostPosted: 11 Sep 2017, 22:42
by Korath
Describe the bug:
With a Magus of the Moon on the bf, each of the following should enter the battlefield as an untapped Mountain with no counters, sacrifices, or other effects:As well as any other non-basic lands that read "As ~ enters the battlefield, ....", "~ enters the battlefield with...", or "If ~ would enter the battlefield, ... instead". I presume the same happens with Essence of the Wild, Humility, and so on.

Which card behaved improperly?
put_card_on_stack3(). Or, more properly, the practice of making these replacement effects run unconditionally at EVENT_RESOLVE_SPELL (or worse, at EVENT_CAST_SPELL for the etb-tapped ones).

Which update are you using? (date, name)Which type? (duel, gauntlet, sealed deck)
Dev 778ccb5.

What exactly should be the correct behavior/interaction?
This extrapolates from the rules reversal for Magus of the Moon in the Iconic Masters release notes: "If a nonbasic land has an ability that applies "as [this land] enters the battlefield" or that causes it to enter the battlefield tapped or with counters, the land will lose that ability before it applies. This is a change from previous rules." I haven't seen the comp rules update yet (have they published it anywhere?)

Are any other cards possibly affected by this bug?
You betcha.

Re: confirm]Rules change:continuous changes override etb rep

PostPosted: 28 Sep 2017, 19:46
by drool66
I haven't seen the comp rules update yet (have they published it anywhere?)
Comprehensive update came out today:

This change is in 603.6b:

Code: Select all
Continuous effects that modify characteristics of a permanent do so the moment the permanent is on the battlefield (and not before then). The permanent is never on the battlefield with its unmodified characteristics. Continuous effects don’t apply before the permanent is on the battlefield, however (see rule 603.6d).
Example: If an effect reads “All lands are creatures” and a land card is played, the effect makes the land card into a creature the moment it enters the battlefield, so it would trigger abilities that trigger when a creature enters the battlefield. Conversely, if an effect reads “All creatures lose all abilities” and a creature card with an enters-the-battlefield triggered ability enters the battlefield, that effect will cause it to lose its abilities the moment it enters the battlefield, so the enters-the-battlefield ability won’t trigger.
The update bulletin should come out tomorrow.

Re: confirm]Rules change:continuous changes override etb rep

PostPosted: 12 Oct 2017, 18:02
by Korath
Update bulletin, for reference. The change was in 614.12 and 614.17d, not 603.6b, and it's discussed at some length there.

Probably the most robust way to deal with this is the one I was already using erroneously in Shandalar: just before sending EVENT_RESOLVE_SPELL in real_put_into_play() and put_card_on_stack3(), make sure recalculate_all_cards_in_play() gets called. This being Manalink, it's not completely straightforward to do so in either location:
  • In real_put_into_play(), unlike put_card_on_stack3(), EVENT_RESOLVE_SPELL gets called before STATE_INVISIBLE is removed from the card. It's got to go back on before the recalculate_all_cards_in_play() call, or else other cards will think it's still on the stack. But it then has to be removed again before sending EVENT_RESOLVE_SPELL, because other cards exploit this to see whether a card resolved normally or was put on the bf/cast as a copy. And then it's got to come back off again afterwards, as it currently is.
  • The dispatch from put_card_on_stack3() is hidden within a call to resolve_top_card_on_stack(), but it's ok to recalc from outside that call without having to migrate it to the dll.
  • For both, you'll want to hack that particular call to recalculate_all_cards_in_play() to not put creatures with toughness - damage <= 0 into the graveyard, since it does state-based effects too.
The enter-the-battlefield-tapped hacks, both for cards themselves and from external effects like Kismet, can't be made to work with this rule and will need redesign. But they didn't work right before this rule either.