diff --git a/forge-game/src/main/java/forge/game/ability/effects/ChangeZoneAllEffect.java b/forge-game/src/main/java/forge/game/ability/effects/ChangeZoneAllEffect.java index e0198ffe0a2..f1e25eccc39 100644 --- a/forge-game/src/main/java/forge/game/ability/effects/ChangeZoneAllEffect.java +++ b/forge-game/src/main/java/forge/game/ability/effects/ChangeZoneAllEffect.java @@ -137,15 +137,17 @@ public class ChangeZoneAllEffect extends SpellAbilityEffect { final int libraryPos = sa.hasParam("LibraryPosition") ? Integer.parseInt(sa.getParam("LibraryPosition")) : 0; - if ((destination == ZoneType.Library || destination == ZoneType.PlanarDeck) - && !sa.hasParam("Shuffle") && cards.size() >= 2 && !random) { - Player p = AbilityUtils.getDefinedPlayers(source, sa.getParamOrDefault("DefinedPlayer", "You"), sa).get(0); - cards = (CardCollection) p.getController().orderMoveToZoneList(cards, destination, sa); - //the last card in this list will be the closest to the top, but we want the first card to be closest. - //so reverse it here before moving them to the library. - java.util.Collections.reverse(cards); - } else { - cards = (CardCollection) GameActionUtil.orderCardsByTheirOwners(game, cards, destination, sa); + if (!random) { + if ((destination == ZoneType.Library || destination == ZoneType.PlanarDeck) + && !sa.hasParam("Shuffle") && cards.size() >= 2) { + Player p = AbilityUtils.getDefinedPlayers(source, sa.getParamOrDefault("DefinedPlayer", "You"), sa).get(0); + cards = (CardCollection) p.getController().orderMoveToZoneList(cards, destination, sa); + //the last card in this list will be the closest to the top, but we want the first card to be closest. + //so reverse it here before moving them to the library. + java.util.Collections.reverse(cards); + } else { + cards = (CardCollection) GameActionUtil.orderCardsByTheirOwners(game, cards, destination, sa); + } } if (destination.equals(ZoneType.Library) && random) {