diff --git a/Mage/src/main/java/mage/abilities/effects/common/ExileGraveyardAllTargetPlayerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ExileGraveyardAllTargetPlayerEffect.java index df002ff631..6feb82f485 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/ExileGraveyardAllTargetPlayerEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/ExileGraveyardAllTargetPlayerEffect.java @@ -2,9 +2,6 @@ package mage.abilities.effects.common; -import java.util.ArrayList; -import java.util.List; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; import mage.constants.Outcome; @@ -31,13 +28,10 @@ public class ExileGraveyardAllTargetPlayerEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); Player targetPlayer = game.getPlayer(this.getTargetPointer().getFirst(game, source)); - if (targetPlayer != null) { - List graveyard = new ArrayList<>(targetPlayer.getGraveyard()); - for (UUID cardId : graveyard) { - game.getCard(cardId).moveToZone(Zone.EXILED, source, game, false); - } - return true; + if (targetPlayer != null && controller != null) { + return targetPlayer.moveCards(targetPlayer.getGraveyard(), Zone.EXILED, source, game); } return false; }