From 9abfe0405407f9f6e2954a229cff43d6a0768808 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Wed, 16 Sep 2015 08:50:51 +0300 Subject: [PATCH] Fix PutIntoGraveFromBattlefieldAllTriggeredAbility: the onlyToControllerGraveyard parameter was not implemented at all. --- .../PutIntoGraveFromBattlefieldAllTriggeredAbility.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Mage/src/mage/abilities/common/PutIntoGraveFromBattlefieldAllTriggeredAbility.java b/Mage/src/mage/abilities/common/PutIntoGraveFromBattlefieldAllTriggeredAbility.java index 45b41aec3e..ffd61df537 100644 --- a/Mage/src/mage/abilities/common/PutIntoGraveFromBattlefieldAllTriggeredAbility.java +++ b/Mage/src/mage/abilities/common/PutIntoGraveFromBattlefieldAllTriggeredAbility.java @@ -60,7 +60,7 @@ public class PutIntoGraveFromBattlefieldAllTriggeredAbility extends TriggeredAbi public PutIntoGraveFromBattlefieldAllTriggeredAbility(final PutIntoGraveFromBattlefieldAllTriggeredAbility ability) { super(ability); this.filter = ability.filter; - this.onlyToControllerGraveyard = ability.onlyToControllerGraveyard; + this.onlyToControllerGraveyard = ability.onlyToControllerGraveyard; this.setTargetPointer = ability.setTargetPointer; } @@ -73,8 +73,11 @@ public class PutIntoGraveFromBattlefieldAllTriggeredAbility extends TriggeredAbi public boolean checkTrigger(GameEvent event, Game game) { ZoneChangeEvent zEvent = (ZoneChangeEvent) event; if (zEvent.getFromZone() == Zone.BATTLEFIELD - && zEvent.getToZone() == Zone.GRAVEYARD) { + && zEvent.getToZone() == Zone.GRAVEYARD) { if (filter.match(zEvent.getTarget(), this.getSourceId(), this.getControllerId(), game)) { + if(onlyToControllerGraveyard && !this.getControllerId().equals(zEvent.getPlayerId())) { + return false; + } if (setTargetPointer) { for (Effect effect :this.getEffects()) { effect.setTargetPointer(new FixedTarget(event.getTargetId()));