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

@ -104,7 +104,6 @@ import mage.target.common.TargetCardInYourGraveyard;
import mage.target.common.TargetCreatureOrPlayer;
import mage.target.common.TargetCreaturePermanentAmount;
import mage.target.common.TargetPermanentOrPlayer;
import mage.util.MessageToClient;
import org.junit.Ignore;
/**
@ -976,12 +975,12 @@ public class TestPlayer implements Player {
@Override
public boolean chooseUse(Outcome outcome, String message, Ability source, Game game) {
return this.chooseUse(outcome, new MessageToClient(message), source, game);
return this.chooseUse(outcome, message, null, null, null, source, game);
}
@Override
public boolean chooseUse(Outcome outcome, MessageToClient message, Ability source, Game game) {
if (message.getMessage().equals("Scry 1?")) {
public boolean chooseUse(Outcome outcome, String message, String secondMessage, String trueText, String falseText, Ability source, Game game) {
if (message.equals("Scry 1?")) {
return false;
}
if (!choices.isEmpty()) {
@ -994,7 +993,7 @@ public class TestPlayer implements Player {
return true;
}
}
return computerPlayer.chooseUse(outcome, message, source, game);
return computerPlayer.chooseUse(outcome, message, secondMessage, trueText, falseText, source, game);
}
@Override

View file

@ -79,7 +79,6 @@ import mage.target.Target;
import mage.target.TargetAmount;
import mage.target.TargetCard;
import mage.target.common.TargetCardInLibrary;
import mage.util.MessageToClient;
/**
*
@ -849,7 +848,7 @@ public class PlayerStub implements Player {
}
@Override
public boolean chooseUse(Outcome outcome, MessageToClient message, Ability source, Game game) {
public boolean chooseUse(Outcome outcome, String message, String secondMessage, String trueText, String falseText, Ability source, Game game) {
return false;
}