Merge branch 'scrollRackReorder' into 'master'

When adding cards to library, insert "closest to top" card last

See merge request core-developers/forge!1986
This commit is contained in:
Michael Kamensky
2019-07-28 12:21:05 +00:00

View File

@@ -134,6 +134,9 @@ public class ChangeZoneAllEffect extends SpellAbilityEffect {
&& !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);
//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);
}
if (destination == ZoneType.Graveyard) {