Added a button to attack with all available cratures.

This commit is contained in:
LevelX2 2015-07-02 17:03:14 +02:00
parent dbfeea6ea2
commit 3eb1fd4047
5 changed files with 79 additions and 36 deletions

View file

@ -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();