mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 21:02:08 -08:00
Added an easier way to put custom text on buttons in a chooseUse prompt.
This commit is contained in:
parent
d70f424d1b
commit
bc0f53973d
9 changed files with 38 additions and 41 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue