* Bojuka Bog - Fixed card movement to exile missing group movement handling (fixes #7243).

This commit is contained in:
LevelX2 2020-12-17 16:41:22 +01:00
parent 3f44d9eef3
commit 991019088f

View file

@ -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<UUID> 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;
}