Merge branch 'master' into 'master'

Improve no ordering for randomized shuffle of cards into library (ChangeZoneAllEffect)

See merge request core-developers/forge!5828
This commit is contained in:
Michael Kamensky
2021-11-14 06:41:02 +00:00

View File

@@ -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 && !((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);
//the last card in this list will be the closest to the top, but we want the first card to be closest.