From fc24fc6800d472891006c90548881203d100881c Mon Sep 17 00:00:00 2001 From: LoneFox Date: Mon, 27 Jul 2015 07:57:52 +0300 Subject: [PATCH] Fix Warped Devotion to work whan a token is bounced --- .../src/mage/sets/eighthedition/WarpedDevotion.java | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Mage.Sets/src/mage/sets/eighthedition/WarpedDevotion.java b/Mage.Sets/src/mage/sets/eighthedition/WarpedDevotion.java index 62f78c48d0..777f332ff0 100644 --- a/Mage.Sets/src/mage/sets/eighthedition/WarpedDevotion.java +++ b/Mage.Sets/src/mage/sets/eighthedition/WarpedDevotion.java @@ -88,20 +88,17 @@ class WarpedDevotionTriggeredAbility extends TriggeredAbilityImpl { public boolean checkTrigger(GameEvent event, Game game) { ZoneChangeEvent zce = (ZoneChangeEvent)event; if(zce.getFromZone() == Zone.BATTLEFIELD && zce.getToZone() == Zone.HAND) { - Card card = game.getCard(event.getTargetId()); - if(card != null) { - for(Effect effect: getEffects()) { - effect.setTargetPointer(new FixedTarget(card.getOwnerId())); - } - return true; + for(Effect effect: getEffects()) { + effect.setTargetPointer(new FixedTarget(zce.getTarget().getOwnerId())); } + return true; } return false; } @Override public String getRule() { - return "Whenever a permanent is returned to a player's hand, that player discards a card"; + return "Whenever a permanent is returned to a player's hand, that player discards a card."; } }