mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
- ChangeZoneAllEffect: don't ask to order cards when they're going to end up being randomized.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user