diff --git a/forge-gui/src/main/java/forge/player/PlayerControllerHuman.java b/forge-gui/src/main/java/forge/player/PlayerControllerHuman.java index 96ef58f2b35..a4f1d9e0f01 100644 --- a/forge-gui/src/main/java/forge/player/PlayerControllerHuman.java +++ b/forge-gui/src/main/java/forge/player/PlayerControllerHuman.java @@ -1064,7 +1064,6 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont @Override public CardCollectionView orderMoveToZoneList(final CardCollectionView cards, final ZoneType destinationZone, final SpellAbility source) { - boolean bottomOfLibrary = false; if (source == null || source.getApi() != ApiType.ReorderZone) { if (destinationZone == ZoneType.Graveyard) { switch (FModel.getPreferences().getPref(FPref.UI_ALLOW_ORDER_GRAVEYARD_WHEN_NEEDED)) { @@ -1087,17 +1086,14 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont } } - if (source != null) { - if (source.hasParam("LibraryPosition")) { - bottomOfLibrary = Integer.parseInt(source.getParam("LibraryPosition")) < 0; - } - } tempShowCards(cards); GameEntityViewMap gameCacheMove = GameEntityView.getMap(cards); List choices = gameCacheMove.getTrackableKeys(); switch (destinationZone) { case Library: + boolean bottomOfLibrary = (source != null && source.hasParam("LibraryPosition") ? + AbilityUtils.calculateAmount(source.getHostCard(), source.getParam("LibraryPosition"), source) : 0) < 0; choices = getGui().order(localizer.getMessage("lblChooseOrderCardsPutIntoLibrary"), localizer.getMessage(bottomOfLibrary ? "lblClosestToBottom" : "lblClosestToTop"), choices, null); break; case Battlefield: