Added an easier way to put custom text on buttons in a chooseUse prompt.

This commit is contained in:
emerald000 2016-09-06 02:07:59 -04:00
parent d70f424d1b
commit bc0f53973d
9 changed files with 38 additions and 41 deletions

View file

@ -40,7 +40,6 @@ import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Random;
import java.util.Set;
import java.util.Stack;
import java.util.UUID;
@ -1010,9 +1009,7 @@ public abstract class GameImpl implements Game, Serializable {
for (UUID playerId : state.getPlayerList(startingPlayerId)) {
Player player = getPlayer(playerId);
if (player != null && player.getHand().size() < startingHandSize) {
if (player.chooseUse(Outcome.Benefit, new MessageToClient("Scry 1?", "Look at the top card of your library. You may put that card on the bottom of your library."), null, this)) {
player.scry(1, null, this);
}
player.scry(1, null, this);
}
}
getState().setChoosingPlayerId(null);

View file

@ -78,7 +78,6 @@ import mage.target.TargetAmount;
import mage.target.TargetCard;
import mage.target.common.TargetCardInLibrary;
import mage.util.Copyable;
import mage.util.MessageToClient;
/**
*
@ -486,7 +485,7 @@ public interface Player extends MageItem, Copyable<Player> {
boolean chooseUse(Outcome outcome, String message, Ability source, Game game);
boolean chooseUse(Outcome outcome, MessageToClient message, Ability source, Game game);
boolean chooseUse(Outcome outcome, String message, String secondMessage, String trueText, String falseText, Ability source, Game game);
boolean choose(Outcome outcome, Choice choice, Game game);