mage icon indicating copy to clipboard operation
mage copied to clipboard

Cards with changeling that enter face-down cause subtype related triggers to fire.

Open DominionSpy opened this issue 2 years ago • 9 comments

A morph (or other face-down creature) should not have any creature types and therefore, when they enter the battlefield face-down, any triggers related to a specific creature type should not fire.

I have found that when a card with Changeling (This card is every creature type) enters face-down, it is causing subtype related triggers to fire.

Steps to Reproduce On the battlefield: [[Inventor's Goggles]], [[Scroll of Fate]] In hand: [[Changeling Outcast]]

  • Activate ability of Scroll of Fate, choosing Changeling Outcast
  • Observe that the ETB trigger of Artificer's Goggles is put onto the stack

[Note] This should not affect interactions within the MKM set, as it does not contain the Changeling keyword, but it does affect interactions with other sets.

DominionSpy avatar Jan 30 '24 11:01 DominionSpy

Inventor's Goggles - (Gatherer) (Scryfall) (EDHREC)

{1} Artifact — Equipment Equipped creature gets +1/+2. Whenever an Artificer enters the battlefield under your control, you may attach Inventor's Goggles to it. Equip {2} ({2}: Attach to target creature you control. Equip only as a sorcery.)

Scroll of Fate - (Gatherer) (Scryfall) (EDHREC)

{3} Artifact {T}: Manifest a card from your hand. (Put that card onto the battlefield face down as a 2/2 creature. Turn it face up any time for its mana cost if it's a creature card.)

Changeling Outcast - (Gatherer) (Scryfall) (EDHREC)

{B} Creature — Shapeshifter 1/1 Changeling (This card is every creature type.) Changeling Outcast can't block and can't be blocked.

github-actions[bot] avatar Jan 30 '24 11:01 github-actions[bot]

Futher investigation shows that a face down changeling also has all creature types while in play.

For example, use Scroll of Fate's ability to manifest a changeling from your hand and try one of the following:

  • Target it with [[Cruel Revival]] - this should be possible, as it is not a Zombie
  • Equip [[Veteran's Powerblade]] to it using Equip Soldier {W} - this should NOT be possible as it is not a Soldier

The following rule determines what should happen:

708.2. Face-down spells and face-down permanents have no characteristics other than those listed by the ability or rules that allowed the spell or permanent to be face down. Any listed characteristics are the copiable values of that object’s characteristics.

[Development Note] In BecomesFaceDownCreatureEffect.apply(), abilities are removed from a permanent:

List<Ability> abilitiesToRemove = new ArrayList<>();
for (Ability ability : permanent.getAbilities()) {

     // keep gained abilities from other sources, removes only own (card text)
     if (card != null && !card.getAbilities().contains(ability)) {
         continue;
     }

     // 701.33c
     // If a card with morph is manifested, its controller may turn that card face up using
     // either the procedure described in rule 702.36e to turn a face-down permanent with morph face up
     // or the procedure described above to turn a manifested permanent face up.
     //
     // so keep all tune face up abilities and other face down compatible
     if (ability.getWorksFaceDown()) {
         ability.setRuleVisible(false);
         continue;
     }

     if (!ability.getRuleVisible() && !ability.getEffects().isEmpty()) {
         if (ability.getEffects().get(0) instanceof BecomesFaceDownCreatureEffect) {
             continue;
         }
     }
     abilitiesToRemove.add(ability);
 }
 permanent.removeAbilities(abilitiesToRemove, source.getSourceId(), game);

However, at this point, the permanent does not have the Changeling ability. It is not added when PermanentCard.copyFromCard() is called. It looks like continuous effects are handled in a different way to other effects - the Changeling effect is added to the layered effects whenever a card with Changeling is loaded into the game.

DominionSpy avatar Feb 01 '24 07:02 DominionSpy

Cruel Revival - (Gatherer) (Scryfall) (EDHREC)

{4}{B} Instant Destroy target non-Zombie creature. It can't be regenerated. Return up to one target Zombie card from your graveyard to your hand.

Veteran's Powerblade - (Gatherer) (Scryfall) (EDHREC)

{3} Artifact — Equipment Equipped creature gets +2/+0. Equip Soldier {W} Equip {2} ({2}: Attach to target creature you control. Equip only as a sorcery.)

github-actions[bot] avatar Feb 01 '24 07:02 github-actions[bot]

It's possible that the current implementation of special actions is not right at the moment.

  1. Special Actions

116.1. Special actions are actions a player may take when they have priority that don’t use the stack. These are not to be confused with turn-based actions and state-based actions, which the game generates automatically. (See rule 703, “Turn-Based Actions,” and rule 704, “State-Based Actions.”)

116.2. There are ten special actions:

116.2a Playing a land is a special action. To play a land, a player puts that land onto the battlefield from the zone it was in (usually that player’s hand). By default, a player can take this action only once during each of their turns. A player can take this action any time they have priority and the stack is empty during a main phase of their turn. See rule 305, “Lands.”

116.2b Turning a face-down creature face up is a special action. A player can take this action any time they have priority. See rule 708, “Face-Down Spells and Permanents.”

116.2c Some effects allow a player to take an action at a later time, usually to end a continuous effect or to stop a delayed triggered ability from triggering. Doing so is a special action. A player can take such an action any time they have priority, unless that effect specifies another timing restriction, for as long as the effect allows it.

116.2d Some effects from static abilities allow a player to take an action to ignore the effect from that ability for a duration. Doing so is a special action. A player can take such an action any time they have priority.

116.2e One card (Circling Vultures) has the ability “You may discard Circling Vultures any time you could cast an instant.” Doing so is a special action. A player can take such an action any time they have priority.

116.2f A player who has a card with suspend in their hand may exile that card. This is a special action. A player can take this action any time they have priority, but only if they could begin to cast that card by putting it onto the stack. See rule 702.62, “Suspend.”

116.2g A player who has chosen a companion may pay {3} to put that card from outside the game into their hand. This is a special action. A player can take this action any time they have priority and the stack is empty during a main phase of their turn, but only if they haven’t done so yet this game. (See rule 702.139, “Companion.”)

116.2h A player who has a card with foretell in their hand may pay {2} and exile that card face down. This is a special action. A player may take this action any time they have priority during their turn. See rule 702.143, “Foretell.”

116.2i In a Planechase game, rolling the planar die is a special action. A player can take this action any time they have priority and the stack is empty during a main phase of their turn. Taking this action costs a player an amount of mana equal to the number of times they have previously taken this action on that turn. Note that this number won’t be equal to the number of times the player has rolled the planar die that turn if an effect has caused the player to roll the planar die that turn. See rule 901, “Planechase.”

116.2j In a Conspiracy Draft game, turning a face-down conspiracy card in the command zone face up is a special action. A player can take this action any time they have priority. See rule 905.4a.

116.3. If a player takes a special action, that player receives priority afterward.

In both PlayerImpl.playLand() and CardImpl.turnFaceUp(), we have logic for replacement effects before the action is completed. It should not be possible to replace these actions in a way that means the action doesn't happen.

There are rule modification effects, such as "You can't play lands.", but these do not replace the event:

614.17. Some effects state that something can’t happen. These effects aren’t replacement effects, but follow similar rules.

There are also replacement effects that are "as" effects, such as "as {this} is turned face up..." (see [[Vesuvan Shapeshifter]]). These and other abilities of face down creatures should be in effect when replacement effects are applied for the , and should never be in effect while the card is face down.

708.2. Face-down spells and face-down permanents have no characteristics other than those listed by the ability or rules that allowed the spell or permanent to be face down. Any listed characteristics are the copiable values of that object’s characteristics. 708.8. As a face-down permanent is turned face up, its copiable values revert to its normal copiable values. Any effects that have been applied to the face-down permanent still apply to the face-up permanent. Any abilities relating to the permanent entering the battlefield don’t trigger and don’t have any effect, because the permanent has already entered the battlefield.

My proposal for fixing this is to do the following:

  • Special actions should perform the action before applying any replacement effects.
  • Replacement effects for special action events should not be allowed to return true (which would mean the event has been replaced).
  • Continuous effects should check if the object is face down and the effect originates from the printed card. If so, the effect should not be applied.

DominionSpy avatar Feb 02 '24 09:02 DominionSpy

Vesuvan Shapeshifter - (Gatherer) (Scryfall) (EDHREC)

{3}{U}{U} Creature — Shapeshifter 0/0 As Vesuvan Shapeshifter enters the battlefield or is turned face up, you may choose another creature on the battlefield. If you do, until Vesuvan Shapeshifter is turned face down, it becomes a copy of that creature, except it has "At the beginning of your upkeep, you may turn this creature face down." Morph {1}{U}

github-actions[bot] avatar Feb 02 '24 09:02 github-actions[bot]

It is not clear to me where in the rules you are getting the interpretation that a special action can't be replaced. That doesn't seem right to me. At least for continuous rule modifying effects, the replacement event has to be checked before the action is performed, in order to prevent it.

xenohedron avatar Feb 03 '24 04:02 xenohedron

Looks like it's a more global problem with ETB and face down abilities like Morph (ETB process face down status fine, but PermanentCard’s reset code ignore face down status and can reset all other things from original card on next game cycle). Related bugs like #10613 and many others. Will look at it.

JayDi85 avatar Feb 20 '24 08:02 JayDi85

It is not clear to me where in the rules you are getting the interpretation that a special action can't be replaced. That doesn't seem right to me. At least for continuous rule modifying effects, the replacement event has to be checked before the action is performed, in order to prevent it.

Continuous rule modifying effects are similar to, but distinct from replacement effects:

614.17. Some effects state that something can’t happen. These effects aren’t replacement effects, but follow similar rules.

We treat them as the same and process them with replacement effects, but perhaps they should be separate checks?

As for replacing special actions, there is no specific rule that I can find that says they can't be replaced. However, consider the following text:

If you would play a land, instead create a Treasure artifact token.

It sounds like a plausible ability, but it can't work in practice, because the first step in playing a land is to put it directly on the battlefield, and not (for example) to declare that you are playing a land.

Another rule that is relevant to the original issue is:

708.11. If a face-down permanent would have an “As [this permanent] is turned face up . . .” ability after it’s turned face up, that ability is applied while that permanent is being turned face up, not afterward.

Maybe another way we could approach this is to have these abilities work even when the permanent is face down?

DominionSpy avatar Feb 21 '24 20:02 DominionSpy

  1. Do you have an example for how separating continuous rule modifying effects and replacement effects into separate checks would help?
  2. I agree that a game event corresponding to taking a special action should not be fully replaced. Do you have any examples of that incorrect usage? I don't think it's a problem.
  3. AsTurnedFaceUpEffect has three usages and all are set so that the corresponding ability works face down. The only other usage of TURN_FACE_UP event is Aquamorph Entity which also has the ability work face down for that aspect. Although interestingly, there is this note in Hooded Hydra suggesting that it might not work properly... haven't investigated: https://github.com/magefree/mage/blob/3f82c36813e99ec1b693a0a0bce8a5f998ca114a/Mage.Sets/src/mage/cards/h/HoodedHydra.java#L49-L55

xenohedron avatar Feb 23 '24 04:02 xenohedron

following up on this @DominionSpy - also maybe worth rebasing #11719 and #11723 after latest face down changes

xenohedron avatar Mar 06 '24 03:03 xenohedron