mirror of
https://github.com/magefree/mage.git
synced 2026-01-23 19:59:54 -08:00
* Chnages to text of priority prompt.
This commit is contained in:
parent
21a13bec61
commit
7d30d288be
2 changed files with 14 additions and 11 deletions
|
|
@ -864,15 +864,8 @@ public final class GamePanel extends javax.swing.JPanel {
|
||||||
|
|
||||||
public void select(String message, GameView gameView, int messageId, Map<String, Serializable> options) {
|
public void select(String message, GameView gameView, int messageId, Map<String, Serializable> options) {
|
||||||
updateGame(gameView, options);
|
updateGame(gameView, options);
|
||||||
String messageToDisplay = message;
|
|
||||||
Map<String, Serializable> panelOptions = null;
|
|
||||||
for (PlayerView playerView : gameView.getPlayers()) {
|
for (PlayerView playerView : gameView.getPlayers()) {
|
||||||
if (playerView.getPlayerId().equals(playerId)) {
|
if (playerView.getPlayerId().equals(playerId)) {
|
||||||
if (playerView.isActive()) {
|
|
||||||
panelOptions = new HashMap<>();
|
|
||||||
panelOptions.put("your_turn", true);
|
|
||||||
messageToDisplay = message + " <div style='font-size:11pt'>Your turn / " + gameView.getStep().toString() + "</div>";
|
|
||||||
}
|
|
||||||
// magenoxx: because of uncaught bug with saving state, rolling back and stack
|
// magenoxx: because of uncaught bug with saving state, rolling back and stack
|
||||||
// undo is allowed only for empty stack
|
// undo is allowed only for empty stack
|
||||||
if (playerView.getStatesSavedSize() > 0 && gameView.getStack().size() == 0) {
|
if (playerView.getStatesSavedSize() > 0 && gameView.getStack().size() == 0) {
|
||||||
|
|
@ -880,7 +873,18 @@ public final class GamePanel extends javax.swing.JPanel {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Map<String, Serializable> panelOptions = new HashMap<>();
|
||||||
|
panelOptions.put("your_turn", true);
|
||||||
|
String playerName;
|
||||||
|
if (gameView.getActivePlayerId().equals(playerId)) {
|
||||||
|
playerName = "Your turn";
|
||||||
|
} else {
|
||||||
|
playerName = gameView.getActivePlayerName();
|
||||||
|
}
|
||||||
|
String messageToDisplay = message + "<div style='font-size:11pt'>" + playerName +" / " + gameView.getStep().toString() + "</div>";
|
||||||
|
|
||||||
this.feedbackPanel.getFeedback(FeedbackMode.SELECT, messageToDisplay, gameView.getSpecial(), panelOptions, messageId);
|
this.feedbackPanel.getFeedback(FeedbackMode.SELECT, messageToDisplay, gameView.getSpecial(), panelOptions, messageId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1719,14 +1719,13 @@ public abstract class GameImpl implements Game, Serializable {
|
||||||
if (simulation) {
|
if (simulation) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
String message = this.state.getTurn().getStepType().toString();
|
String message;
|
||||||
if (this.canPlaySorcery(playerId)) {
|
if (this.canPlaySorcery(playerId)) {
|
||||||
message += " - play spells and abilities.";
|
message = "Play spells and abilities.";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
message += " - play instants and activated abilities.";
|
message = "Play instants and activated abilities.";
|
||||||
}
|
}
|
||||||
|
|
||||||
playerQueryEventSource.select(playerId, message);
|
playerQueryEventSource.select(playerId, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue