From ec2c93d0db962c0e062d7ddfba3ce717264beed3 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Tue, 2 Dec 2014 21:48:08 +0100 Subject: [PATCH] * Viridian Revel - Fixed that it wrongly also triggerd for cards going to your own graveyard. --- Mage.Sets/src/mage/sets/scarsofmirrodin/ViridianRevel.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/ViridianRevel.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/ViridianRevel.java index 503d1ba100..d48efdd6c3 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/ViridianRevel.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/ViridianRevel.java @@ -40,6 +40,7 @@ import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.ZoneChangeEvent; +import mage.players.Player; /** * @@ -51,6 +52,8 @@ public class ViridianRevel extends CardImpl { super(ownerId, 132, "Viridian Revel", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}{G}"); this.expansionSetCode = "SOM"; this.color.setGreen(true); + + // Whenever an artifact is put into an opponent's graveyard from the battlefield, you may draw a card. this.addAbility(new ViridianRevelTriggeredAbility()); } @@ -82,7 +85,9 @@ class ViridianRevelTriggeredAbility extends TriggeredAbilityImpl { public boolean checkTrigger(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.ZONE_CHANGE && ((ZoneChangeEvent)event).isDiesEvent()) { Card card = game.getCard(event.getTargetId()); - if (card != null && card.getCardType().contains(CardType.ARTIFACT)) { + Player controller = game.getPlayer(getControllerId()); + if (controller != null && card != null && card.getCardType().contains(CardType.ARTIFACT) + && controller.hasOpponent(card.getOwnerId(), game)) { return true; } }