* Rakshasa Vizier - Fixed that the ability also triggered for cards of other players (fixes #699).

This commit is contained in:
LevelX2 2015-02-02 11:07:39 +01:00
parent 00801e3ecf
commit 022e5eda1c

View file

@ -31,6 +31,7 @@ import java.util.UUID;
import mage.MageInt;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
@ -61,7 +62,7 @@ public class RakshasaVizier extends CardImpl {
this.toughness = new MageInt(4);
// Whenever one or more cards are put into exile from your graveyard, put that many +1/+1 counters on Rakshasa Vizier.
// TODO: Handle effects that move more than one card with one trigger.
// TODO: Handle effects that move more than one card with one trigger (e.g. if opponent want to counter a trigger, he has now to counter multiple instead of one).
this.addAbility(new RakshasaVizierTriggeredAbility());
}
@ -91,7 +92,10 @@ class RakshasaVizierTriggeredAbility extends TriggeredAbilityImpl {
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
if (zEvent.getFromZone() == Zone.GRAVEYARD
&& zEvent.getToZone() == Zone.EXILED) {
Card card = game.getCard(event.getTargetId());
if (card != null && card.getOwnerId().equals(getControllerId())) {
return true;
}
}
}