diff --git a/src/main/java/forge/card/ability/effects/ScryEffect.java b/src/main/java/forge/card/ability/effects/ScryEffect.java index 72e22124e8a..4d69e30d91d 100644 --- a/src/main/java/forge/card/ability/effects/ScryEffect.java +++ b/src/main/java/forge/card/ability/effects/ScryEffect.java @@ -71,12 +71,15 @@ public class ScryEffect extends SpellAbilityEffect { } ImmutablePair, List> lists = p.getController().arrangeForScry(topN); - - for(Card c : lists.getRight()) { - p.getGame().getAction().moveToBottomOfLibrary(c); + List toTop = lists.getLeft(); + List toBottom = lists.getRight(); + + if ( null != toBottom) { + for(Card c : toBottom) { + p.getGame().getAction().moveToBottomOfLibrary(c); + } } - List toTop = lists.getLeft(); if ( null != toTop ) { Collections.reverse(toTop); // the last card in list will become topmost in library, have to revert thus. for(Card c : toTop) { diff --git a/src/main/java/forge/game/player/PlayerControllerHuman.java b/src/main/java/forge/game/player/PlayerControllerHuman.java index f0b24d33101..359b10ad8d4 100644 --- a/src/main/java/forge/game/player/PlayerControllerHuman.java +++ b/src/main/java/forge/game/player/PlayerControllerHuman.java @@ -1,6 +1,7 @@ package forge.game.player; import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -292,15 +293,30 @@ public class PlayerControllerHuman extends PlayerController { @Override public ImmutablePair, List> arrangeForScry(List topN) { - List toBottom = GuiChoose.order("Select cards to be put on the bottom of your library", "Cards to put on the bottom", -1, topN, null, null); - topN.removeAll(toBottom); - List toTop = topN.isEmpty() ? null : GuiChoose.order("Arrange cards to be put on top of your library", "Cards arranged", 0, topN, null, null); + List toBottom = null; + List toTop = null; + + if (topN.size() == 1) { + if (willPutCardOnTop(topN.get(0))) + toTop = topN; + else + toBottom = topN; + } else { + toBottom = GuiChoose.order("Select cards to be put on the bottom of your library", "Cards to put on the bottom", -1, topN, null, null); + topN.removeAll(toBottom); + if ( topN.isEmpty() ) + toTop = null; + else if ( topN.size() == 1 ) + toTop = topN; + else + toTop = GuiChoose.order("Arrange cards to be put on top of your library", "Cards arranged", 0, topN, null, null); + } return ImmutablePair.of(toTop, toBottom); } @Override public boolean willPutCardOnTop(Card c) { - return GuiDialog.confirm(c, "Where you put " + c.getName() + " in your library", new String[]{"Top", "Bottom"} ); + return GuiDialog.confirm(c, "Where will you put " + c.getName() + " in your library", new String[]{"Top", "Bottom"} ); } }