From 3e7a8efb60f3d9df11e64ab59a3cb6a9c886d193 Mon Sep 17 00:00:00 2001 From: Michael Kamensky Date: Sun, 14 Nov 2021 08:22:53 +0300 Subject: [PATCH 1/2] - Improve no ordering for randomized shuffle of cards into library (ChangeZoneAllEffect) --- .../java/forge/game/ability/effects/ChangeZoneAllEffect.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 f1e25eccc39..14fdd3ed773 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,9 +137,8 @@ public class ChangeZoneAllEffect extends SpellAbilityEffect { final int libraryPos = sa.hasParam("LibraryPosition") ? Integer.parseInt(sa.getParam("LibraryPosition")) : 0; - if (!random) { - if ((destination == ZoneType.Library || destination == ZoneType.PlanarDeck) - && !sa.hasParam("Shuffle") && cards.size() >= 2) { + if (!random && !sa.hasParam("Shuffle")) { + if ((destination == ZoneType.Library || destination == ZoneType.PlanarDeck) && 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. From 0d4e9716d9732e01197a6f564d816834ccbb96ca Mon Sep 17 00:00:00 2001 From: Michael Kamensky Date: Sun, 14 Nov 2021 09:28:12 +0300 Subject: [PATCH 2/2] - A little bit more specific restriction. --- .../java/forge/game/ability/effects/ChangeZoneAllEffect.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 14fdd3ed773..bac54df3eab 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,7 +137,7 @@ public class ChangeZoneAllEffect extends SpellAbilityEffect { final int libraryPos = sa.hasParam("LibraryPosition") ? Integer.parseInt(sa.getParam("LibraryPosition")) : 0; - if (!random && !sa.hasParam("Shuffle")) { + if (!random && !((destination == ZoneType.Library || destination == ZoneType.PlanarDeck) && sa.hasParam("Shuffle"))) { if ((destination == ZoneType.Library || destination == ZoneType.PlanarDeck) && cards.size() >= 2) { Player p = AbilityUtils.getDefinedPlayers(source, sa.getParamOrDefault("DefinedPlayer", "You"), sa).get(0); cards = (CardCollection) p.getController().orderMoveToZoneList(cards, destination, sa);