About the @movedTo trigger...

Discute about general card coding keyword, ask questions and get answer about the mechanism, about the guideline, the direction we want to go...etc...
Post Reply
Site Admin
Posts: 3727
Joined: Wed Oct 15, 2008 12:42 am
Location: Japan

About the @movedTo trigger...

Post by wololo » Thu Sep 23, 2010 5:08 am

I've fixed a few bugs today regarding cards coding involving the @movedTo keyword.
Although it is probable that there are bugs in the C++ code, the cards I've fixed so far were incorrectly coded (issues in the card itself, not the C++ code), and this is because of a confusion that we all make...

Basically, a card doesn't really "move" from one zone to another. Instead, the current card CA is removed from its zone ZA, and a new one CB is created in the destination zone ZB.

Why is this important? Because there is a probability that the card CA does not have the same properties as card CB.

Here is a very simple example: imagine you have living lands (all forests [in play] are 1/1 creatures) and a forest in play. Imagine that your opponent kills the forest, and that you have a card that says "when a creature is put into a graveyard from play..."

You want this card to trigger when the forest is put into the graveyard. But here is the trick: while it is in play, the forest is a creature, but once it reaches the graveyard, it is not one anymore (it becomes a Forest Card, which is not a "forest" from rulings point of view). so what you want to test with this trigger is not if a creature landed in the graveyard, but if a creature was in play, and then landed in the graveyard.

So you don't want that trigger to be
@movedTo(creature|graveyard) from(Battlefield) <-- incorrect
@movedTo(graveyard) from(creature|Battlefield) <-- correct

The same applies for the keyword "mytgt" (for auras and equipment). mytgt should usually be in the "from" clause, not in the "to" clause

I hope this clears some things up :)

Posts: 3029
Joined: Thu Jun 10, 2010 11:28 pm

Re: About the @movedTo trigger...

Post by Zethfox » Thu Sep 23, 2010 2:46 pm

kinda like saying....

@movedto(graveyard) TRIGGEREDFROM(creature|mybattlefield)

maybe we should change "from(" to "triggeredfrom(" would make alot more sense.

Posts: 50
Joined: Thu Jan 20, 2011 11:45 pm

Re: About the @movedTo trigger...

Post by S4r0m » Wed Feb 02, 2011 7:46 pm

Sorry for asking but, i'm not sure if i understand, If the card was erased from zoneA and then created again in zoneB, and now the card truly moves from zone to zone, keeping their properties... Cards like Alter Reality and Elemental appeal could be now playables isn't it? Or what does that means?

Post Reply