Added commander's zone info in leave/keep message

This commit is contained in:
Oleg Agafonov 2020-06-19 12:54:42 +04:00
parent fc5d766ebd
commit bdaf6454de

View file

@ -1875,7 +1875,11 @@ public abstract class GameImpl implements Game, Serializable {
.forEach(commanders::add);
commanders.removeIf(card -> state.checkCommanderShouldStay(card, this));
for (Card card : commanders) {
if (player.chooseUse(Outcome.Benefit, "Move " + card.getIdName() + " to the command zone or leave it in its current zone?", "You can only make this choice once", "Move to command", "Leave in current zone", null, this)) {
Zone currentZone = this.getState().getZone(card.getId());
String currentZoneInfo = (currentZone == null ? "(error)" : "(" + currentZone.name() + ")");
if (player.chooseUse(Outcome.Benefit, "Move " + card.getIdName()
+ " to the command zone or leave it in current zone " + currentZoneInfo + "?", "You can only make this choice once per object",
"Move to command", "Leave in current zone " + currentZoneInfo, null, this)) {
toMove.add(card);
} else {
state.setCommanderShouldStay(card, this);