mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
update translation text to use have placeholder string
This commit is contained in:
@@ -25,7 +25,6 @@ import forge.match.input.InputPayMana;
|
|||||||
import forge.match.input.InputPayManaOfCostPayment;
|
import forge.match.input.InputPayManaOfCostPayment;
|
||||||
import forge.match.input.InputPayManaSimple;
|
import forge.match.input.InputPayManaSimple;
|
||||||
import forge.match.input.InputSelectCardsFromList;
|
import forge.match.input.InputSelectCardsFromList;
|
||||||
import forge.util.Lang;
|
|
||||||
import forge.util.TextUtil;
|
import forge.util.TextUtil;
|
||||||
import forge.util.collect.FCollectionView;
|
import forge.util.collect.FCollectionView;
|
||||||
import forge.util.gui.SGuiChoose;
|
import forge.util.gui.SGuiChoose;
|
||||||
@@ -312,7 +311,7 @@ public class HumanPlay {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!p.getController().confirmPayment(part, Localizer.getInstance().getMessage("lblDoYouWantPay") + " " + amount + " " + Localizer.getInstance().getMessage("lblLife") + "?" + orString, sourceAbility)) {
|
if (!p.getController().confirmPayment(part, Localizer.getInstance().getMessage("lblDoYouWantPayNLife", String.valueOf(amount)) + orString, sourceAbility)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -332,11 +331,15 @@ public class HumanPlay {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
StringBuilder sb = new StringBuilder(Localizer.getInstance().getMessage("lblDoyouWantTo") + " ");
|
String message = null;
|
||||||
sb.append(res.contains(p) ? "" : Localizer.getInstance().getMessage("lblLetThatPlayer") + " ");
|
if (res.contains(p)) {
|
||||||
sb.append(Localizer.getInstance().getMessage("lblDraw") + " ").append(Lang.nounWithAmount(amount, " " + Localizer.getInstance().getMessage("lblCard"))).append("?").append(orString);
|
message = Localizer.getInstance().getMessage("lblDoYouWantLetThatPlayerDrawNCardOrDoAction", String.valueOf(amount), orString);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
message = Localizer.getInstance().getMessage("lblDoYouWantDrawNCardOrDoAction", String.valueOf(amount), orString);
|
||||||
|
}
|
||||||
|
|
||||||
if (!p.getController().confirmPayment(part, sb.toString(), sourceAbility)) {
|
if (!p.getController().confirmPayment(part, message, sourceAbility)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -370,7 +373,7 @@ public class HumanPlay {
|
|||||||
final int amount = getAmountFromPart(part, source, sourceAbility);
|
final int amount = getAmountFromPart(part, source, sourceAbility);
|
||||||
final CardCollectionView list = p.getCardsIn(ZoneType.Library);
|
final CardCollectionView list = p.getCardsIn(ZoneType.Library);
|
||||||
if (list.size() < amount) { return false; }
|
if (list.size() < amount) { return false; }
|
||||||
if (!p.getController().confirmPayment(part, Localizer.getInstance().getMessage("lbllblDoYouWantMill") + " " + amount + " " + Localizer.getInstance().getMessage("lblCard") + (amount == 1 ? "" : "s") + "?" + orString, sourceAbility)) {
|
if (!p.getController().confirmPayment(part, Localizer.getInstance().getMessage("lblDoYouWantMillNCardsOrDoAction", String.valueOf(amount), orString), sourceAbility)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
CardCollectionView listmill = p.getCardsIn(ZoneType.Library, amount);
|
CardCollectionView listmill = p.getCardsIn(ZoneType.Library, amount);
|
||||||
@@ -378,7 +381,7 @@ public class HumanPlay {
|
|||||||
}
|
}
|
||||||
else if (part instanceof CostFlipCoin) {
|
else if (part instanceof CostFlipCoin) {
|
||||||
final int amount = getAmountFromPart(part, source, sourceAbility);
|
final int amount = getAmountFromPart(part, source, sourceAbility);
|
||||||
if (!p.getController().confirmPayment(part, Localizer.getInstance().getMessage("lblDoYouWantFlip") + " " + amount + " " + Localizer.getInstance().getMessage("lblCoin") + (amount == 1 ? "" : "s") + "?" + orString, sourceAbility)) {
|
if (!p.getController().confirmPayment(part, Localizer.getInstance().getMessage("lblDoYouWantFlipNCoinOrDoAction", String.valueOf(amount), orString), sourceAbility)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
final int n = FlipCoinEffect.getFilpMultiplier(p);
|
final int n = FlipCoinEffect.getFilpMultiplier(p);
|
||||||
@@ -412,7 +415,7 @@ public class HumanPlay {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!mandatory) {
|
if (!mandatory) {
|
||||||
if (!p.getController().confirmPayment(part, Localizer.getInstance().getMessage("lblDoYouWantRemove") + " " + Lang.nounWithAmount(amount, counterType.getName() + " " + Localizer.getInstance().getMessage("lblCounterOfPointer")) + " " + Localizer.getInstance().getMessage("lblFrom") + " " + source + "?",sourceAbility)) {
|
if (!p.getController().confirmPayment(part, Localizer.getInstance().getMessage("lblDoYouWantRemoveNTargetTypeCounterFromCard", String.valueOf(amount), counterType.getName(), source), sourceAbility)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -432,7 +435,7 @@ public class HumanPlay {
|
|||||||
if (allCounters < amount) { return false; }
|
if (allCounters < amount) { return false; }
|
||||||
|
|
||||||
if (!mandatory) {
|
if (!mandatory) {
|
||||||
if (!p.getController().confirmPayment(part, Localizer.getInstance().getMessage("lblDoYouWantRemoveCounters") + " " + part.getDescriptiveType() + " ?",sourceAbility)) {
|
if (!p.getController().confirmPayment(part, Localizer.getInstance().getMessage("lblDoYouWantRemoveCountersFromCard", part.getDescriptiveType()), sourceAbility)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -492,8 +495,7 @@ public class HumanPlay {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (from == ZoneType.Library) {
|
if (from == ZoneType.Library) {
|
||||||
if (!p.getController().confirmPayment(part, Localizer.getInstance().getMessage("lblDoYouWantExile") + " " + nNeeded +
|
if (!p.getController().confirmPayment(part, Localizer.getInstance().getMessage("lblDoYouWantExileNCardsFromYourLibrary", String.valueOf(nNeeded)), sourceAbility)) {
|
||||||
" " + Localizer.getInstance().getMessage("lblCard") + (nNeeded == 1 ? "" : "s") + " " + Localizer.getInstance().getMessage("lblFromYourLibrary"), sourceAbility)) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
list = list.subList(0, nNeeded);
|
list = list.subList(0, nNeeded);
|
||||||
@@ -502,7 +504,7 @@ public class HumanPlay {
|
|||||||
// replace this with input
|
// replace this with input
|
||||||
CardCollection newList = new CardCollection();
|
CardCollection newList = new CardCollection();
|
||||||
for (int i = 0; i < nNeeded; i++) {
|
for (int i = 0; i < nNeeded; i++) {
|
||||||
final Card c = p.getGame().getCard(SGuiChoose.oneOrNone(Localizer.getInstance().getMessage("lblExileFrom") + " " + from, CardView.getCollection(list)));
|
final Card c = p.getGame().getCard(SGuiChoose.oneOrNone(Localizer.getInstance().getMessage("lblExileFromZone", from.toString()), CardView.getCollection(list)));
|
||||||
if (c == null) {
|
if (c == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -538,7 +540,7 @@ public class HumanPlay {
|
|||||||
payableZone.add(player);
|
payableZone.add(player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Player chosen = controller.getGame().getPlayer(SGuiChoose.oneOrNone(TextUtil.concatNoSpace(Localizer.getInstance().getMessage("lblPutCardFromWhose") + " ", from.toString(), "?"), PlayerView.getCollection(payableZone)));
|
Player chosen = controller.getGame().getPlayer(SGuiChoose.oneOrNone(Localizer.getInstance().getMessage("lblPutCardFromWhoseZone", from.toString()), PlayerView.getCollection(payableZone)));
|
||||||
if (chosen == null) {
|
if (chosen == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -629,7 +631,7 @@ public class HumanPlay {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!mandatory) {
|
if (!mandatory) {
|
||||||
if (!p.getController().confirmPayment(part, Localizer.getInstance().getMessage("lblDoYouWantSpend") + " " + Lang.nounWithAmount(amount, counterType.getName() + " " + Localizer.getInstance().getMessage("lblCounterOfPointer")) + "?",sourceAbility)) {
|
if (!p.getController().confirmPayment(part, Localizer.getInstance().getMessage("lblDoYouWantSpendNTargetTypeCounter", String.valueOf(amount), counterType.getName()), sourceAbility)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -675,7 +677,7 @@ 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("lblSelectOfCardsTo") + " %d " + cpl.getDescriptiveType() + " " + Localizer.getInstance().getMessage("lblCardsTo") + " " + actionName);
|
inp.setMessage(Localizer.getInstance().getMessage("lblSelectNSpecifyTypeCardsToAction", cpl.getDescriptiveType(), actionName));
|
||||||
inp.setCancelAllowed(true);
|
inp.setCancelAllowed(true);
|
||||||
|
|
||||||
inp.showAndWait();
|
inp.showAndWait();
|
||||||
|
|||||||
@@ -246,10 +246,10 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
|
|||||||
if (newMain != null) {
|
if (newMain != null) {
|
||||||
String errMsg;
|
String errMsg;
|
||||||
if (newMain.size() < deckMinSize) {
|
if (newMain.size() < deckMinSize) {
|
||||||
errMsg = TextUtil.concatNoSpace(localizer.getMessage("lblTooFewCardsMainDeck").replace("%s", String.valueOf(deckMinSize)));
|
errMsg = TextUtil.concatNoSpace(localizer.getMessage("lblTooFewCardsMainDeck", String.valueOf(deckMinSize)));
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
errMsg = TextUtil.concatNoSpace(localizer.getMessage("lblTooManyCardsSideboard").replace("%s", String.valueOf(sbMax)));
|
errMsg = TextUtil.concatNoSpace(localizer.getMessage("lblTooManyCardsSideboard", String.valueOf(sbMax)));
|
||||||
}
|
}
|
||||||
getGui().showErrorDialog(errMsg, localizer.getMessage("lblInvalidDeck"));
|
getGui().showErrorDialog(errMsg, localizer.getMessage("lblInvalidDeck"));
|
||||||
}
|
}
|
||||||
@@ -313,7 +313,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
|
|||||||
public Integer announceRequirements(final SpellAbility ability, final String announce,
|
public Integer announceRequirements(final SpellAbility ability, final String announce,
|
||||||
final boolean canChooseZero) {
|
final boolean canChooseZero) {
|
||||||
final int min = canChooseZero ? 0 : 1;
|
final int min = canChooseZero ? 0 : 1;
|
||||||
return getGui().getInteger(localizer.getMessage("lblChooseAnnounceFor").replace("%s", announce).replace("%name", ability.getHostCard().getName()) , min,
|
return getGui().getInteger(localizer.getMessage("lblChooseAnnounceForCard", announce, ability.getHostCard().getName()) , min,
|
||||||
Integer.MAX_VALUE, min + 9);
|
Integer.MAX_VALUE, min + 9);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -336,14 +336,16 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
|
|||||||
return CardCollection.EMPTY;
|
return CardCollection.EMPTY;
|
||||||
}
|
}
|
||||||
|
|
||||||
final StringBuilder builder = new StringBuilder(localizer.getMessage("lblSelectOfCardsTo") + " ");
|
String inpMessage = null;
|
||||||
if (min == 0) {
|
if (min == 0) {
|
||||||
builder.append(localizer.getMessage("lblUpTo") + " ");
|
inpMessage = localizer.getMessage("lblSelectUpToNumTargetToAction", message, action);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
inpMessage = localizer.getMessage("lblSelectNumTargetToAction", message, action);
|
||||||
}
|
}
|
||||||
builder.append("%d ").append(message).append("(s) " + localizer.getMessage("lblTo") + " ").append(action).append(".");
|
|
||||||
|
|
||||||
final InputSelectCardsFromList inp = new InputSelectCardsFromList(this, min, max, valid, sa);
|
final InputSelectCardsFromList inp = new InputSelectCardsFromList(this, min, max, valid, sa);
|
||||||
inp.setMessage(builder.toString());
|
inp.setMessage(inpMessage);
|
||||||
inp.setCancelAllowed(min == 0);
|
inp.setCancelAllowed(min == 0);
|
||||||
inp.showAndWait();
|
inp.showAndWait();
|
||||||
return new CardCollection(inp.getSelected());
|
return new CardCollection(inp.getSelected());
|
||||||
@@ -654,17 +656,25 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
|
|||||||
@Override
|
@Override
|
||||||
public Player chooseStartingPlayer(final boolean isFirstGame) {
|
public Player chooseStartingPlayer(final boolean isFirstGame) {
|
||||||
if (game.getPlayers().size() == 2) {
|
if (game.getPlayers().size() == 2) {
|
||||||
String prompt = String.format(
|
String prompt = null;
|
||||||
isFirstGame ? localizer.getMessage("lblYouHaveWonTheCoinToss") : localizer.getMessage("lblYouLostTheLastGame"),
|
if (isFirstGame) {
|
||||||
player.getName());
|
prompt = localizer.getMessage("lblYouHaveWonTheCoinToss", player.getName());
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
prompt = localizer.getMessage("lblYouLostTheLastGame", player.getName());
|
||||||
|
}
|
||||||
prompt += "\n\n" + localizer.getMessage("lblWouldYouLiketoPlayorDraw");
|
prompt += "\n\n" + localizer.getMessage("lblWouldYouLiketoPlayorDraw");
|
||||||
final InputConfirm inp = new InputConfirm(this, prompt, localizer.getMessage("lblPlay"), localizer.getMessage("lblDraw"));
|
final InputConfirm inp = new InputConfirm(this, prompt, localizer.getMessage("lblPlay"), localizer.getMessage("lblDraw"));
|
||||||
inp.showAndWait();
|
inp.showAndWait();
|
||||||
return inp.getResult() ? this.player : this.player.getOpponents().get(0);
|
return inp.getResult() ? this.player : this.player.getOpponents().get(0);
|
||||||
} else {
|
} else {
|
||||||
String prompt = String.format(
|
String prompt = null;
|
||||||
isFirstGame ? localizer.getMessage("lblYouHaveWonTheCoinToss") : localizer.getMessage("lblYouLostTheLastGame"),
|
if (isFirstGame) {
|
||||||
player.getName());
|
prompt = localizer.getMessage("lblYouHaveWonTheCoinToss", player.getName());
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
prompt = localizer.getMessage("lblYouLostTheLastGame", player.getName());
|
||||||
|
}
|
||||||
prompt += "\n\n" + localizer.getMessage("lblWhoWouldYouLiketoStartthisGame");
|
prompt += "\n\n" + localizer.getMessage("lblWhoWouldYouLiketoStartthisGame");
|
||||||
final InputSelectEntitiesFromList<Player> input = new InputSelectEntitiesFromList<>(this, 1, 1,
|
final InputSelectEntitiesFromList<Player> input = new InputSelectEntitiesFromList<>(this, 1, 1,
|
||||||
new FCollection<>(game.getPlayersInTurnOrder()));
|
new FCollection<>(game.getPlayersInTurnOrder()));
|
||||||
@@ -678,7 +688,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
|
|||||||
public CardCollection orderBlockers(final Card attacker, final CardCollection blockers) {
|
public CardCollection orderBlockers(final Card attacker, final CardCollection blockers) {
|
||||||
final CardView vAttacker = CardView.get(attacker);
|
final CardView vAttacker = CardView.get(attacker);
|
||||||
getGui().setPanelSelection(vAttacker);
|
getGui().setPanelSelection(vAttacker);
|
||||||
return game.getCardList(getGui().order(localizer.getMessage("lblChooseDamageOrderFor").replace("%s", vAttacker.toString()), localizer.getMessage("lblDamagedFirst"),
|
return game.getCardList(getGui().order(localizer.getMessage("lblChooseDamageOrderFor", vAttacker.toString()), localizer.getMessage("lblDamagedFirst"),
|
||||||
CardView.getCollection(blockers), vAttacker));
|
CardView.getCollection(blockers), vAttacker));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -703,7 +713,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
|
|||||||
final CardView vAttacker = CardView.get(attacker);
|
final CardView vAttacker = CardView.get(attacker);
|
||||||
getGui().setPanelSelection(vAttacker);
|
getGui().setPanelSelection(vAttacker);
|
||||||
return game.getCardList(getGui().insertInList(
|
return game.getCardList(getGui().insertInList(
|
||||||
localizer.getMessage("lblChooseBlockerAfterWhichToPlaceAttackert").replace("%s", vAttacker.toString()),
|
localizer.getMessage("lblChooseBlockerAfterWhichToPlaceAttackert", vAttacker.toString()),
|
||||||
CardView.get(blocker), CardView.getCollection(oldBlockers)));
|
CardView.get(blocker), CardView.getCollection(oldBlockers)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -711,7 +721,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
|
|||||||
public CardCollection orderAttackers(final Card blocker, final CardCollection attackers) {
|
public CardCollection orderAttackers(final Card blocker, final CardCollection attackers) {
|
||||||
final CardView vBlocker = CardView.get(blocker);
|
final CardView vBlocker = CardView.get(blocker);
|
||||||
getGui().setPanelSelection(vBlocker);
|
getGui().setPanelSelection(vBlocker);
|
||||||
return game.getCardList(getGui().order(localizer.getMessage("lblChooseDamageOrderFor").replace("%s", vBlocker.toString()), localizer.getMessage("lblDamagedFirst"),
|
return game.getCardList(getGui().order(localizer.getMessage("lblChooseDamageOrderFor", vBlocker.toString()), localizer.getMessage("lblDamagedFirst"),
|
||||||
CardView.getCollection(attackers), vBlocker));
|
CardView.getCollection(attackers), vBlocker));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -723,9 +733,9 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
|
|||||||
@Override
|
@Override
|
||||||
public void reveal(final List<CardView> cards, final ZoneType zone, final PlayerView owner, String message) {
|
public void reveal(final List<CardView> cards, final ZoneType zone, final PlayerView owner, String message) {
|
||||||
if (StringUtils.isBlank(message)) {
|
if (StringUtils.isBlank(message)) {
|
||||||
message = localizer.getMessage("lblLookingCardIn") + " {player's} " + zone.name().toLowerCase();
|
message = localizer.getMessage("lblLookCardInPlayerZone", "{player's}", zone.name().toLowerCase());
|
||||||
} else {
|
} else {
|
||||||
message += "{player's} " + zone.name().toLowerCase();
|
message += localizer.getMessage("lblPlayerZone", "{player's}", zone.name().toLowerCase());
|
||||||
}
|
}
|
||||||
final String fm = MessageUtil.formatMessage(message, getLocalPlayerView(), owner);
|
final String fm = MessageUtil.formatMessage(message, getLocalPlayerView(), owner);
|
||||||
if (!cards.isEmpty()) {
|
if (!cards.isEmpty()) {
|
||||||
@@ -733,7 +743,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
|
|||||||
getGui().reveal(fm, cards);
|
getGui().reveal(fm, cards);
|
||||||
endTempShowCards();
|
endTempShowCards();
|
||||||
} else {
|
} else {
|
||||||
getGui().message(MessageUtil.formatMessage(localizer.getMessage("lblThereNoCardIn") + " {player's} " + zone.name().toLowerCase(),
|
getGui().message(MessageUtil.formatMessage(localizer.getMessage("lblThereNoCardInPlayerZone", "{player's}", zone.name().toLowerCase()),
|
||||||
player, owner), fm);
|
player, owner), fm);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -809,7 +819,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
|
|||||||
tempShowCard(c);
|
tempShowCard(c);
|
||||||
getGui().setCard(view);
|
getGui().setCard(view);
|
||||||
boolean result = false;
|
boolean result = false;
|
||||||
result = InputConfirm.confirm(this, view, TextUtil.concatNoSpace(localizer.getMessage("lblPut") + " ", view.toString(), " " + localizer.getMessage("lblOnTheTopLibraryOrGraveyard")),
|
result = InputConfirm.confirm(this, view, localizer.getMessage("lblPutCardsOnTheTopLibraryOrGraveyard", view.toString()),
|
||||||
true, ImmutableList.of(localizer.getMessage("lblLibrary"), localizer.getMessage("lblGraveyard")));
|
true, ImmutableList.of(localizer.getMessage("lblLibrary"), localizer.getMessage("lblGraveyard")));
|
||||||
if (result) {
|
if (result) {
|
||||||
toTop = topN;
|
toTop = topN;
|
||||||
@@ -841,7 +851,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
|
|||||||
getGui().setCard(c.getView());
|
getGui().setCard(c.getView());
|
||||||
|
|
||||||
boolean result = false;
|
boolean result = false;
|
||||||
result = InputConfirm.confirm(this, view, localizer.getMessage("lblPutCardOnTopOrBottomLibrary").replace("%s", view.toString()),
|
result = InputConfirm.confirm(this, view, localizer.getMessage("lblPutCardOnTopOrBottomLibrary", view.toString()),
|
||||||
true, ImmutableList.of(localizer.getMessage("lblTop"), localizer.getMessage("lblBottom")));
|
true, ImmutableList.of(localizer.getMessage("lblTop"), localizer.getMessage("lblBottom")));
|
||||||
|
|
||||||
endTempShowCards();
|
endTempShowCards();
|
||||||
@@ -1003,7 +1013,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
|
|||||||
return super.hasAllTargets();
|
return super.hasAllTargets();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
target.setMessage(localizer.getMessage("lblSelectNCardsToDiscardUnlessDiscarduType").replace("%s", uType));
|
target.setMessage(localizer.getMessage("lblSelectNCardsToDiscardUnlessDiscarduType", uType));
|
||||||
target.showAndWait();
|
target.showAndWait();
|
||||||
return new CardCollection(target.getSelected());
|
return new CardCollection(target.getSelected());
|
||||||
}
|
}
|
||||||
@@ -1019,8 +1029,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
|
|||||||
final List<String> options = Lists.newArrayList();
|
final List<String> options = Lists.newArrayList();
|
||||||
for (int i = 0; i < manaChoices.size(); i++) {
|
for (int i = 0; i < manaChoices.size(); i++) {
|
||||||
final Mana m = manaChoices.get(i);
|
final Mana m = manaChoices.get(i);
|
||||||
options.add(TextUtil.concatNoSpace(String.valueOf(1 + i), ". ", MagicColor.toLongString(m.getColor()),
|
options.add(localizer.getMessage("lblNColorManaFromCard", String.valueOf(1 + i), MagicColor.toLongString(m.getColor()), m.getSourceCard().toString()));
|
||||||
" " + localizer.getMessage("lblManaFrom") + " ", m.getSourceCard().toString()));
|
|
||||||
}
|
}
|
||||||
final String chosen = getGui().one(localizer.getMessage("lblPayManaFromManaPool"), options);
|
final String chosen = getGui().one(localizer.getMessage("lblPayManaFromManaPool"), options);
|
||||||
final String idx = TextUtil.split(chosen, '.')[0];
|
final String idx = TextUtil.split(chosen, '.')[0];
|
||||||
@@ -1044,9 +1053,9 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
|
|||||||
sortCreatureTypes(types);
|
sortCreatureTypes(types);
|
||||||
}
|
}
|
||||||
if (isOptional) {
|
if (isOptional) {
|
||||||
return getGui().oneOrNone(localizer.getMessage("lblChooseATargetType").replace("%s", kindOfType.toLowerCase()), types);
|
return getGui().oneOrNone(localizer.getMessage("lblChooseATargetType", kindOfType.toLowerCase()), types);
|
||||||
}
|
}
|
||||||
return getGui().one(localizer.getMessage("lblChooseATargetType").replace("%s", kindOfType.toLowerCase()), types);
|
return getGui().one(localizer.getMessage("lblChooseATargetType", kindOfType.toLowerCase()), types);
|
||||||
}
|
}
|
||||||
|
|
||||||
// sort creature types such that those most prevalent in player's deck are
|
// sort creature types such that those most prevalent in player's deck are
|
||||||
@@ -1317,7 +1326,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
final String message = localizer.getMessage("lblCleanupPhase") + "\n"
|
final String message = localizer.getMessage("lblCleanupPhase") + "\n"
|
||||||
+ localizer.getMessage("lblSelectCardsToDiscardHandDownMaximum").replace("%d", String.valueOf(nDiscard)).replace("%max", String.valueOf(max));
|
+ localizer.getMessage("lblSelectCardsToDiscardHandDownMaximum", String.valueOf(nDiscard), String.valueOf(max));
|
||||||
inp.setMessage(message);
|
inp.setMessage(message);
|
||||||
inp.setCancelAllowed(false);
|
inp.setCancelAllowed(false);
|
||||||
inp.showAndWait();
|
inp.showAndWait();
|
||||||
@@ -1486,8 +1495,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
|
|||||||
game.getTracker().freeze(); // refreeze if the tracker was frozen prior to this update
|
game.getTracker().freeze(); // refreeze if the tracker was frozen prior to this update
|
||||||
}
|
}
|
||||||
final List<SpellAbilityView> choices = new ArrayList<>(spellViewCache.keySet());
|
final List<SpellAbilityView> choices = new ArrayList<>(spellViewCache.keySet());
|
||||||
final String modeTitle = TextUtil.concatNoSpace(sa.getActivatingPlayer().toString(), " " + localizer.getMessage("lblActivated") + " ",
|
final String modeTitle = localizer.getMessage("PlayerActivatedCardChooseMode", sa.getActivatingPlayer().toString(), sa.getHostCard().toString());
|
||||||
sa.getHostCard().toString(), " - " + localizer.getMessage("lblChooseAMode"));
|
|
||||||
final List<AbilitySub> chosen = Lists.newArrayListWithCapacity(num);
|
final List<AbilitySub> chosen = Lists.newArrayListWithCapacity(num);
|
||||||
for (int i = 0; i < num; i++) {
|
for (int i = 0; i < num; i++) {
|
||||||
SpellAbilityView a;
|
SpellAbilityView a;
|
||||||
@@ -1770,7 +1778,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
|
|||||||
@Override
|
@Override
|
||||||
public void revealAnte(final String message, final Multimap<Player, PaperCard> removedAnteCards) {
|
public void revealAnte(final String message, final Multimap<Player, PaperCard> removedAnteCards) {
|
||||||
for (final Player p : removedAnteCards.keySet()) {
|
for (final Player p : removedAnteCards.keySet()) {
|
||||||
getGui().reveal(message + " " + localizer.getMessage("lblFrom") + " " + Lang.getPossessedObject(MessageUtil.mayBeYou(player, p), localizer.getMessage("lblDeck")),
|
getGui().reveal(localizer.getMessage("lblActionFromPlayerDeck", message, Lang.getPossessedObject(MessageUtil.mayBeYou(player, p), "")),
|
||||||
ImmutableList.copyOf(removedAnteCards.get(p)));
|
ImmutableList.copyOf(removedAnteCards.get(p)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2356,11 +2364,21 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
|
|||||||
|
|
||||||
private void addCardToZone(ZoneType zone, final boolean repeatLast, final boolean noTriggers) {
|
private void addCardToZone(ZoneType zone, final boolean repeatLast, final boolean noTriggers) {
|
||||||
final ZoneType targetZone = repeatLast ? lastAddedZone : zone;
|
final ZoneType targetZone = repeatLast ? lastAddedZone : zone;
|
||||||
String zoneStr = targetZone != ZoneType.Battlefield ? localizer.getMessage("lblIn") + " " + targetZone.name().toLowerCase()
|
String message = null;
|
||||||
: noTriggers ? localizer.getMessage("lblOnTheBattlefield") : localizer.getMessage("lblOnTheStackOrInPlay");
|
if (targetZone != ZoneType.Battlefield) {
|
||||||
|
message = localizer.getMessage("lblPutCardInWhichPlayerZone", targetZone.name().toLowerCase());
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (noTriggers) {
|
||||||
|
message = localizer.getMessage("lblPutCardInWhichPlayerBattlefield");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
message = localizer.getMessage("lblPutCardInWhichPlayerPlayOrStack");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
final Player p = repeatLast ? lastAddedPlayer
|
final Player p = repeatLast ? lastAddedPlayer
|
||||||
: game.getPlayer(getGui().oneOrNone(localizer.getMessage("lblPutCard") + " " + zoneStr + " " + localizer.getMessage("lblForWhichPlayer"),
|
: game.getPlayer(getGui().oneOrNone(message,
|
||||||
PlayerView.getCollection(game.getPlayers())));
|
PlayerView.getCollection(game.getPlayers())));
|
||||||
if (p == null) {
|
if (p == null) {
|
||||||
return;
|
return;
|
||||||
@@ -2391,7 +2409,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
|
|||||||
lastSummoningSickness = true;
|
lastSummoningSickness = true;
|
||||||
} else {
|
} else {
|
||||||
lastSummoningSickness = getGui().confirm(forgeCard.getView(),
|
lastSummoningSickness = getGui().confirm(forgeCard.getView(),
|
||||||
TextUtil.concatWithSpace(localizer.getMessage("lblShould"), forgeCard.toString(), localizer.getMessage("lblAffectedWithSummoningSickness")));
|
localizer.getMessage("lblCardShouldBeSummoningSicknessConfirm", forgeCard.toString()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2440,8 +2458,8 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
|
|||||||
}
|
}
|
||||||
} else if (targetZone == ZoneType.Library) {
|
} else if (targetZone == ZoneType.Library) {
|
||||||
if (!repeatLast) {
|
if (!repeatLast) {
|
||||||
lastTopOfTheLibrary = getGui().confirm(forgeCard.getView(),
|
lastTopOfTheLibrary = getGui().confirm(forgeCard.getView(), localizer.getMessage("lblCardShouldBeAddedToLibraryTopOrBottom", forgeCard.toString()),
|
||||||
TextUtil.concatWithSpace(localizer.getMessage("lblShould"), forgeCard.toString(), localizer.getMessage("lblBeAddedToLibraryTopOrBottom")), true, Arrays.asList(localizer.getMessage("lblTop"), localizer.getMessage("lblBottom")));
|
true, Arrays.asList(localizer.getMessage("lblTop"), localizer.getMessage("lblBottom")));
|
||||||
}
|
}
|
||||||
if (lastTopOfTheLibrary) {
|
if (lastTopOfTheLibrary) {
|
||||||
game.getAction().moveToLibrary(forgeCard, null);
|
game.getAction().moveToLibrary(forgeCard, null);
|
||||||
|
|||||||
Reference in New Issue
Block a user