Merge branch 'patch' into 'master'

Some prompt tweaks

See merge request core-developers/forge!5918
This commit is contained in:
Michael Kamensky
2021-12-08 03:52:25 +00:00
2 changed files with 11 additions and 5 deletions

View File

@@ -1253,7 +1253,7 @@ lblChooseCreature=Choose a creature
lblChosenCards=Chosen Cards lblChosenCards=Chosen Cards
lblAttacker=Attacker lblAttacker=Attacker
lblTriggeredby=Triggered by lblTriggeredby=Triggered by
lblChooseWhichCardstoReveal=Choose Which Cards to Reveal lblChooseWhichCardstoReveal=Choose which card(s) to reveal
lblChooseCardsActivateOpeningHandandOrder=Choose cards to activate from opening hand and their order lblChooseCardsActivateOpeningHandandOrder=Choose cards to activate from opening hand and their order
lblActivateFirst=Activate first lblActivateFirst=Activate first
lblChooseOptionalCosts=Choose optional Costs lblChooseOptionalCosts=Choose optional Costs
@@ -1755,7 +1755,7 @@ lblFinalMatch=FINAL MATCH
#DualListBox.java #DualListBox.java
lblSelectOrder=Select Order lblSelectOrder=Select Order
#HumanPlay.java #HumanPlay.java
lblIfYouDo=if you do lblIfYouDo=If you do
lblOr=or lblOr=or
lblDoYouWantPay=Do you want to pay lblDoYouWantPay=Do you want to pay
lblDoYouWantPayNLife=Do you want to pay {0} life? lblDoYouWantPayNLife=Do you want to pay {0} life?

View File

@@ -243,10 +243,15 @@ public class HumanPlay {
if (!parts.isEmpty()) { if (!parts.isEmpty()) {
costPart = parts.get(0); costPart = parts.get(0);
} }
String orString = prompt == null ? sourceAbility.getStackDescription().trim() : ""; String orString;
if (sourceAbility.hasParam("OrString")) {
orString = sourceAbility.getParam("OrString");
} else {
orString = prompt == null ? sourceAbility.getStackDescription().trim() : "";
}
if (!orString.isEmpty()) { if (!orString.isEmpty()) {
if (sourceAbility.hasParam("UnlessSwitched")) { if (sourceAbility.hasParam("UnlessSwitched")) {
orString = TextUtil.concatWithSpace(" (" + Localizer.getInstance().getMessage("lblIfYouDo") + ":", orString, ")"); a orString = TextUtil.concatWithSpace(" (" + Localizer.getInstance().getMessage("lblIfYouDo") + ":", orString + ")");
} else { } else {
orString = TextUtil.concatWithSpace(" (" + Localizer.getInstance().getMessage("lblOr") + ":", orString, ")"); orString = TextUtil.concatWithSpace(" (" + Localizer.getInstance().getMessage("lblOr") + ":", orString, ")");
} }
@@ -553,7 +558,8 @@ public class HumanPlay {
if (list.size() < amount) { return false; } // unable to pay (not enough cards) if (list.size() < amount) { return false; } // unable to pay (not enough cards)
InputSelectCardsFromList inp = new InputSelectCardsFromList(controller, amount, amount, list, sourceAbility); InputSelectCardsFromList inp = new InputSelectCardsFromList(controller, amount, amount, list, sourceAbility);
inp.setMessage(Localizer.getInstance().getMessage("lblSelectNSpecifyTypeCardsToAction", cpl.getDescriptiveType(), actionName)); String cardDesc = cpl.getDescriptiveType().equalsIgnoreCase("Card") ? "" : cpl.getDescriptiveType();
inp.setMessage(Localizer.getInstance().getMessage("lblSelectNSpecifyTypeCardsToAction", cardDesc, actionName));
inp.setCancelAllowed(true); inp.setCancelAllowed(true);
inp.showAndWait(); inp.showAndWait();