forked from External/mage
Added a button to attack with all available cratures.
This commit is contained in:
parent
dbfeea6ea2
commit
3eb1fd4047
5 changed files with 79 additions and 36 deletions
|
|
@ -47,6 +47,7 @@ import mage.client.components.MageTextArea;
|
|||
import mage.client.dialog.MageDialog;
|
||||
import mage.client.util.audio.AudioManager;
|
||||
import mage.client.util.gui.ArrowBuilder;
|
||||
import mage.constants.Constants;
|
||||
import mage.constants.PlayerAction;
|
||||
import mage.remote.Session;
|
||||
import org.apache.log4j.Logger;
|
||||
|
|
@ -140,14 +141,21 @@ public class FeedbackPanel extends javax.swing.JPanel {
|
|||
endWithTimeout();
|
||||
break;
|
||||
}
|
||||
this.btnSpecial.setVisible(special);
|
||||
this.btnSpecial.setText("Special");
|
||||
this.helper.setSpecial("Special", special);
|
||||
// Handling Phyrexian mana
|
||||
if (message.contains("P}")) {
|
||||
if (options != null && options.containsKey(Constants.Option.SPECIAL_BUTTON)) {
|
||||
String specialText = (String) options.get(Constants.Option.SPECIAL_BUTTON);
|
||||
this.btnSpecial.setVisible(true);
|
||||
this.btnSpecial.setText("Pay 2 life");
|
||||
this.helper.setSpecial("Pay 2 life", true);
|
||||
this.btnSpecial.setText(specialText);
|
||||
this.helper.setSpecial(specialText, true);
|
||||
} else {
|
||||
this.btnSpecial.setVisible(special);
|
||||
this.btnSpecial.setText("Special");
|
||||
this.helper.setSpecial("Special", special);
|
||||
// Handling Phyrexian mana
|
||||
if (message.contains("P}")) {
|
||||
this.btnSpecial.setVisible(true);
|
||||
this.btnSpecial.setText("Pay 2 life");
|
||||
this.helper.setSpecial("Pay 2 life", true);
|
||||
}
|
||||
}
|
||||
|
||||
requestFocusIfPossible();
|
||||
|
|
|
|||
|
|
@ -1020,6 +1020,9 @@ public final class GamePanel extends javax.swing.JPanel {
|
|||
|
||||
}
|
||||
Map<String, Serializable> panelOptions = new HashMap<>();
|
||||
if (options != null) {
|
||||
panelOptions.putAll(options);
|
||||
}
|
||||
panelOptions.put("your_turn", true);
|
||||
String activePlayerText;
|
||||
if (gameView.getActivePlayerId().equals(playerId)) {
|
||||
|
|
|
|||
|
|
@ -200,6 +200,7 @@ public class HelperPanel extends JPanel {
|
|||
}
|
||||
});
|
||||
|
||||
// sets a darker background and higher simiss time fpr tooltip in the feedback / helper panel
|
||||
textArea.addMouseListener(new MouseAdapter() {
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue