From 9fee1fda1eb8a37e44fd80c2018922bf84ae6363 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Fri, 30 Apr 2021 22:21:56 +0800 Subject: [PATCH] update order Message --- .../src/main/java/forge/player/PlayerControllerHuman.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/forge-gui/src/main/java/forge/player/PlayerControllerHuman.java b/forge-gui/src/main/java/forge/player/PlayerControllerHuman.java index d8913de1254..86ee5e8373c 100644 --- a/forge-gui/src/main/java/forge/player/PlayerControllerHuman.java +++ b/forge-gui/src/main/java/forge/player/PlayerControllerHuman.java @@ -997,6 +997,7 @@ 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)) { @@ -1019,13 +1020,18 @@ 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: - choices = getGui().order(localizer.getMessage("lblChooseOrderCardsPutIntoLibrary"), localizer.getMessage("lblClosestToTop"), choices, null); + choices = getGui().order(localizer.getMessage("lblChooseOrderCardsPutIntoLibrary"), localizer.getMessage(bottomOfLibrary ? "lblClosestToBottom" : "lblClosestToTop"), choices, null); break; case Battlefield: choices = getGui().order(localizer.getMessage("lblChooseOrderCardsPutOntoBattlefield"), localizer.getMessage("lblPutFirst"), choices, null);