mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
GUI, preferences: removed rare/useless settings:
* Show ability picker forced - removed and keep enabled for all; * Show turn info in logs - removed and keep enabled for all;
This commit is contained in:
parent
4d89fcd72d
commit
754e5fc41a
9 changed files with 58 additions and 292 deletions
|
|
@ -286,8 +286,7 @@ public class ChatPanelBasic extends javax.swing.JPanel {
|
|||
}
|
||||
|
||||
String getTurnInfoPart(String turnInfo) {
|
||||
boolean canUse = Boolean.parseBoolean(PreferencesDialog.getCachedValue(PreferencesDialog.KEY_GAME_LOG_SHOW_TURN_INFO, "true"));
|
||||
return (turnInfo == null || !canUse ? "" : ", " + turnInfo);
|
||||
return turnInfo == null ? "" : ", " + turnInfo;
|
||||
}
|
||||
|
||||
protected String getColoredText(String color, String text) {
|
||||
|
|
|
|||
|
|
@ -87,11 +87,6 @@ public final class Constants {
|
|||
public static final String BASE_SOUND_PATH = "sounds" + File.separator; // TODO: check path with File.separator
|
||||
public static final String BASE_MUSICS_PATH = "music" + File.separator;
|
||||
|
||||
// battlefield feedback panel colors (used in preferences dialogs too)
|
||||
public static final int BATTLEFIELD_FEEDBACK_COLORIZING_MODE_DISABLE = 0;
|
||||
public static final int BATTLEFIELD_FEEDBACK_COLORIZING_MODE_ENABLE_BY_ONE_COLOR = 1;
|
||||
public static final int BATTLEFIELD_FEEDBACK_COLORIZING_MODE_ENABLE_BY_MULTICOLOR = 2;
|
||||
|
||||
public static final int AUTO_TARGET_DISABLE = 0;
|
||||
public static final int AUTO_TARGET_NON_FEEL_BAD = 1;
|
||||
public static final int AUTO_TARGET_ALL = 2;
|
||||
|
|
|
|||
|
|
@ -84,7 +84,6 @@
|
|||
<Component id="main_card" alignment="1" max="32767" attributes="0"/>
|
||||
<Component id="main_gamelog" alignment="1" max="32767" attributes="0"/>
|
||||
<Component id="main_game" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="main_battlefield" alignment="1" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
|
|
@ -99,9 +98,7 @@
|
|||
<Component id="main_game" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="main_gamelog" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="main_battlefield" max="32767" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="20" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="95" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
|
|
@ -124,13 +121,6 @@
|
|||
<Property name="axis" type="int" value="3"/>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JCheckBox" name="cbGameLogShowTurnInfo">
|
||||
<Properties>
|
||||
<Property name="selected" type="boolean" value="true"/>
|
||||
<Property name="text" type="java.lang.String" value="Show turn info in game logs (example: 19:01 T2.DA: game message)"/>
|
||||
<Property name="toolTipText" type="java.lang.String" value="Add turn number and step info after time in game logs"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="cbGameLogAutoSave">
|
||||
<Properties>
|
||||
<Property name="selected" type="boolean" value="true"/>
|
||||
|
|
@ -293,12 +283,11 @@
|
|||
<Group type="103" alignment="0" groupAlignment="0" max="-2" attributes="0">
|
||||
<Component id="showPlayerNamesPermanently" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="nonLandPermanentsInOnePile" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="cbConfirmEmptyManaPool" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="cbConfirmEmptyManaPool" alignment="0" pref="449" max="32767" attributes="0"/>
|
||||
<Component id="cbAllowRequestToShowHandCards" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="showAbilityPickerForced" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<EmptySpace pref="179" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
|
|
@ -310,9 +299,7 @@
|
|||
<Component id="showPlayerNamesPermanently" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="displayLifeOnAvatar" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="showAbilityPickerForced" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="cbAllowRequestToShowHandCards" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="cbConfirmEmptyManaPool" min="-2" max="-2" attributes="0"/>
|
||||
|
|
@ -323,6 +310,7 @@
|
|||
<Component id="lblTargetAutoChoose" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="cbTargetAutoChooseLevel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace pref="27" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
|
|
@ -352,13 +340,6 @@
|
|||
<Property name="toolTipText" type="java.lang.String" value="Display the player's life over its avatar image."/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="showAbilityPickerForced">
|
||||
<Properties>
|
||||
<Property name="selected" type="boolean" value="true"/>
|
||||
<Property name="text" type="java.lang.String" value="Show ability picker for 1 available option (spells without costs, mdf/split side, adventure)"/>
|
||||
<Property name="toolTipText" type="java.lang.String" value="This prevents you from accidently activating abilities what you don't want (example: if you haven't mana to cast main side, but clicks on mdf card and play land instead)"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="cbAllowRequestToShowHandCards">
|
||||
<Properties>
|
||||
<Property name="selected" type="boolean" value="true"/>
|
||||
|
|
@ -409,69 +390,6 @@
|
|||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="main_battlefield">
|
||||
<Properties>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
|
||||
<TitledBorder title="Battlefield">
|
||||
<Border PropertyName="innerBorder" info="org.netbeans.modules.form.compat2.border.EtchedBorderInfo">
|
||||
<EtchetBorder/>
|
||||
</Border>
|
||||
</TitledBorder>
|
||||
</Border>
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="lblBattlefieldFeedbackColorizingMode" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="cbBattlefieldFeedbackColorizingMode" min="-2" pref="278" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="lblBattlefieldFeedbackColorizingMode" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="cbBattlefieldFeedbackColorizingMode" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JComboBox" name="cbBattlefieldFeedbackColorizingMode">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
|
||||
<StringArray count="3">
|
||||
<StringItem index="0" value="Disable colorizing"/>
|
||||
<StringItem index="1" value="Enable one color for all phases"/>
|
||||
<StringItem index="2" value="Enable multicolor for different phases"/>
|
||||
</StringArray>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" value="Battlefield feedback panel colorizing on your turn (e.g. use green color if you must select card or answer to request)"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="cbBattlefieldFeedbackColorizingModeActionPerformed"/>
|
||||
</Events>
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value=""/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lblBattlefieldFeedbackColorizingMode">
|
||||
<Properties>
|
||||
<Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor">
|
||||
<ComponentRef name="cbBattlefieldFeedbackColorizingMode"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" value="Feedback panel colorizing:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="tabAvatars">
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import mage.client.MageFrame;
|
|||
import mage.client.SessionHandler;
|
||||
import mage.client.components.KeyBindButton;
|
||||
import static mage.client.constants.Constants.AUTO_TARGET_NON_FEEL_BAD;
|
||||
import static mage.client.constants.Constants.BATTLEFIELD_FEEDBACK_COLORIZING_MODE_ENABLE_BY_MULTICOLOR;
|
||||
import mage.client.themes.ThemeType;
|
||||
import mage.client.util.CardLanguage;
|
||||
import mage.client.util.ClientDefaultSettings;
|
||||
|
|
@ -59,14 +58,11 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
public static final String KEY_PERMANENTS_IN_ONE_PILE = "nonLandPermanentsInOnePile";
|
||||
public static final String KEY_SHOW_PLAYER_NAMES_PERMANENTLY = "showPlayerNamesPermanently";
|
||||
public static final String KEY_DISPLAY_LIVE_ON_AVATAR = "displayLiveOnAvatar";
|
||||
public static final String KEY_SHOW_ABILITY_PICKER_FORCED = "showAbilityPicker";
|
||||
public static final String KEY_GAME_ALLOW_REQUEST_SHOW_HAND_CARDS = "gameAllowRequestShowHandCards";
|
||||
public static final String KEY_GAME_CONFIRM_EMPTY_MANA_POOL = "gameConfirmEmptyManaPool";
|
||||
public static final String KEY_GAME_ASK_MOVE_TO_GRAVE_ORDER = "gameAskMoveToGraveORder";
|
||||
public static final String KEY_GAME_USE_PROFANITY_FILTER = "gameUseProfanityFilter";
|
||||
|
||||
public static final String KEY_BATTLEFIELD_FEEDBACK_COLORIZING_MODE = "battlefieldFeedbackColorizingMode";
|
||||
|
||||
// size settings
|
||||
public static final String KEY_GUI_CHAT_FONT_SIZE = "guiChatFontSize";
|
||||
public static final String KEY_GUI_CARD_HAND_SIZE = "guiCardHandSize";
|
||||
|
|
@ -79,7 +75,6 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
public static final String KEY_GUI_CARD_BATTLEFIELD_MAX_SIZE = "guiCardBattlefieldMaxSize";
|
||||
public static final String KEY_GUI_PLAYER_PANEL_SIZE = "guiPlayerPanelSize";
|
||||
|
||||
public static final String KEY_GAME_LOG_SHOW_TURN_INFO = "gameLogShowTurnInfo";
|
||||
public static final String KEY_GAME_LOG_AUTO_SAVE = "gameLogAutoSave";
|
||||
public static final String KEY_DRAFT_LOG_AUTO_SAVE = "draftLogAutoSave";
|
||||
public static final String KEY_LIMITED_DECK_AUTO_SAVE = "draftLimitedAutoSave";
|
||||
|
|
@ -637,7 +632,6 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
tabsPanel = new javax.swing.JTabbedPane();
|
||||
tabMain = new javax.swing.JPanel();
|
||||
main_gamelog = new javax.swing.JPanel();
|
||||
cbGameLogShowTurnInfo = new javax.swing.JCheckBox();
|
||||
cbGameLogAutoSave = new javax.swing.JCheckBox();
|
||||
cbDraftLogAutoSave = new javax.swing.JCheckBox();
|
||||
cbLimitedDeckAutoSave = new javax.swing.JCheckBox();
|
||||
|
|
@ -651,15 +645,11 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
nonLandPermanentsInOnePile = new javax.swing.JCheckBox();
|
||||
showPlayerNamesPermanently = new javax.swing.JCheckBox();
|
||||
displayLifeOnAvatar = new javax.swing.JCheckBox();
|
||||
showAbilityPickerForced = new javax.swing.JCheckBox();
|
||||
cbAllowRequestToShowHandCards = new javax.swing.JCheckBox();
|
||||
cbConfirmEmptyManaPool = new javax.swing.JCheckBox();
|
||||
cbAskMoveToGraveOrder = new javax.swing.JCheckBox();
|
||||
lblTargetAutoChoose = new javax.swing.JLabel();
|
||||
cbTargetAutoChooseLevel = new javax.swing.JComboBox<>();
|
||||
main_battlefield = new javax.swing.JPanel();
|
||||
cbBattlefieldFeedbackColorizingMode = new javax.swing.JComboBox();
|
||||
lblBattlefieldFeedbackColorizingMode = new javax.swing.JLabel();
|
||||
tabAvatars = new javax.swing.JPanel();
|
||||
avatarPane = new javax.swing.JScrollPane();
|
||||
avatarPanel = new javax.swing.JPanel();
|
||||
|
|
@ -891,11 +881,6 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
main_gamelog.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Game log"));
|
||||
main_gamelog.setLayout(new javax.swing.BoxLayout(main_gamelog, javax.swing.BoxLayout.PAGE_AXIS));
|
||||
|
||||
cbGameLogShowTurnInfo.setSelected(true);
|
||||
cbGameLogShowTurnInfo.setText("Show turn info in game logs (example: 19:01 T2.DA: game message)");
|
||||
cbGameLogShowTurnInfo.setToolTipText("Add turn number and step info after time in game logs");
|
||||
main_gamelog.add(cbGameLogShowTurnInfo);
|
||||
|
||||
cbGameLogAutoSave.setSelected(true);
|
||||
cbGameLogAutoSave.setText("Save game logs (dest folder: \"..\\xmage\\mage-client\\gamelogs\")");
|
||||
cbGameLogAutoSave.setToolTipText("The logs of all your games will be saved to the mentioned folder if this option is switched on.");
|
||||
|
|
@ -995,10 +980,6 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
displayLifeOnAvatar.setText("Display life on avatar image");
|
||||
displayLifeOnAvatar.setToolTipText("Display the player's life over its avatar image.");
|
||||
|
||||
showAbilityPickerForced.setSelected(true);
|
||||
showAbilityPickerForced.setText("Show ability picker for 1 available option (spells without costs, mdf/split side, adventure)");
|
||||
showAbilityPickerForced.setToolTipText("This prevents you from accidently activating abilities what you don't want (example: if you haven't mana to cast main side, but clicks on mdf card and play land instead)");
|
||||
|
||||
cbAllowRequestToShowHandCards.setSelected(true);
|
||||
cbAllowRequestToShowHandCards.setText("Allow requests from players and spectators to show your hand cards");
|
||||
cbAllowRequestToShowHandCards.setToolTipText("<html>This is the default setting used for your matches. If activated other players or spectators<br>\nof your match can send a request so you can allow them to see your hand cards.");
|
||||
|
|
@ -1034,10 +1015,9 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
.add(main_gameLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
|
||||
.add(showPlayerNamesPermanently, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.add(nonLandPermanentsInOnePile, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.add(cbConfirmEmptyManaPool, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.add(cbAllowRequestToShowHandCards, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.add(showAbilityPickerForced)))
|
||||
.addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.add(cbConfirmEmptyManaPool, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 449, Short.MAX_VALUE)
|
||||
.add(cbAllowRequestToShowHandCards, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
|
||||
.addContainerGap(179, Short.MAX_VALUE))
|
||||
);
|
||||
main_gameLayout.setVerticalGroup(
|
||||
main_gameLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
|
||||
|
|
@ -1047,9 +1027,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
.add(showPlayerNamesPermanently)
|
||||
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
|
||||
.add(displayLifeOnAvatar)
|
||||
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
|
||||
.add(showAbilityPickerForced)
|
||||
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
|
||||
.addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
|
||||
.add(cbAllowRequestToShowHandCards)
|
||||
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
|
||||
.add(cbConfirmEmptyManaPool)
|
||||
|
|
@ -1058,43 +1036,13 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
|
||||
.add(main_gameLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
|
||||
.add(lblTargetAutoChoose)
|
||||
.add(cbTargetAutoChooseLevel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
|
||||
.add(cbTargetAutoChooseLevel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
|
||||
.addContainerGap(27, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
nonLandPermanentsInOnePile.getAccessibleContext().setAccessibleName("nonLandPermanentsInOnePile");
|
||||
cbTargetAutoChooseLevel.getAccessibleContext().setAccessibleName("Auto-choose targets for player combo box");
|
||||
|
||||
main_battlefield.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Battlefield"));
|
||||
|
||||
cbBattlefieldFeedbackColorizingMode.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Disable colorizing", "Enable one color for all phases", "Enable multicolor for different phases" }));
|
||||
cbBattlefieldFeedbackColorizingMode.setToolTipText("Battlefield feedback panel colorizing on your turn (e.g. use green color if you must select card or answer to request)");
|
||||
cbBattlefieldFeedbackColorizingMode.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
cbBattlefieldFeedbackColorizingModeActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
lblBattlefieldFeedbackColorizingMode.setLabelFor(cbBattlefieldFeedbackColorizingMode);
|
||||
lblBattlefieldFeedbackColorizingMode.setText("Feedback panel colorizing:");
|
||||
|
||||
org.jdesktop.layout.GroupLayout main_battlefieldLayout = new org.jdesktop.layout.GroupLayout(main_battlefield);
|
||||
main_battlefield.setLayout(main_battlefieldLayout);
|
||||
main_battlefieldLayout.setHorizontalGroup(
|
||||
main_battlefieldLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
|
||||
.add(main_battlefieldLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.add(lblBattlefieldFeedbackColorizingMode)
|
||||
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
|
||||
.add(cbBattlefieldFeedbackColorizingMode, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 278, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
|
||||
.addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
main_battlefieldLayout.setVerticalGroup(
|
||||
main_battlefieldLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
|
||||
.add(main_battlefieldLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
|
||||
.add(lblBattlefieldFeedbackColorizingMode)
|
||||
.add(cbBattlefieldFeedbackColorizingMode, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
|
||||
);
|
||||
|
||||
org.jdesktop.layout.GroupLayout tabMainLayout = new org.jdesktop.layout.GroupLayout(tabMain);
|
||||
tabMain.setLayout(tabMainLayout);
|
||||
tabMainLayout.setHorizontalGroup(
|
||||
|
|
@ -1104,8 +1052,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
.add(tabMainLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
|
||||
.add(org.jdesktop.layout.GroupLayout.TRAILING, main_card, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.add(org.jdesktop.layout.GroupLayout.TRAILING, main_gamelog, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.add(main_game, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.add(org.jdesktop.layout.GroupLayout.TRAILING, main_battlefield, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.add(main_game, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addContainerGap())
|
||||
);
|
||||
tabMainLayout.setVerticalGroup(
|
||||
|
|
@ -1117,9 +1064,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
.add(main_game, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
|
||||
.add(main_gamelog, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
|
||||
.add(main_battlefield, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.add(20, 20, 20))
|
||||
.addContainerGap(95, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
main_card.getAccessibleContext().setAccessibleName("Game panel");
|
||||
|
|
@ -2846,27 +2791,17 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
save(prefs, dialog.nonLandPermanentsInOnePile, KEY_PERMANENTS_IN_ONE_PILE, "true", "false");
|
||||
save(prefs, dialog.showPlayerNamesPermanently, KEY_SHOW_PLAYER_NAMES_PERMANENTLY, "true", "false");
|
||||
save(prefs, dialog.displayLifeOnAvatar, KEY_DISPLAY_LIVE_ON_AVATAR, "true", "false");
|
||||
save(prefs, dialog.showAbilityPickerForced, KEY_SHOW_ABILITY_PICKER_FORCED, "true", "false");
|
||||
save(prefs, dialog.cbAllowRequestToShowHandCards, KEY_GAME_ALLOW_REQUEST_SHOW_HAND_CARDS, "true", "false");
|
||||
save(prefs, dialog.cbConfirmEmptyManaPool, KEY_GAME_CONFIRM_EMPTY_MANA_POOL, "true", "false");
|
||||
save(prefs, dialog.cbAskMoveToGraveOrder, KEY_GAME_ASK_MOVE_TO_GRAVE_ORDER, "true", "false");
|
||||
save(prefs, dialog.cbGameLogShowTurnInfo, KEY_GAME_LOG_SHOW_TURN_INFO, "true", "false");
|
||||
save(prefs, dialog.cbGameLogAutoSave, KEY_GAME_LOG_AUTO_SAVE, "true", "false");
|
||||
save(prefs, dialog.cbDraftLogAutoSave, KEY_DRAFT_LOG_AUTO_SAVE, "true", "false");
|
||||
save(prefs, dialog.cbLimitedDeckAutoSave, KEY_LIMITED_DECK_AUTO_SAVE, "true", "false");
|
||||
save(prefs, dialog.cbGameJsonLogAutoSave, KEY_JSON_GAME_LOG_AUTO_SAVE, "true", "false");
|
||||
|
||||
String paramName = KEY_BATTLEFIELD_FEEDBACK_COLORIZING_MODE;
|
||||
int paramValue = dialog.cbBattlefieldFeedbackColorizingMode.getSelectedIndex();
|
||||
int paramDefault = BATTLEFIELD_FEEDBACK_COLORIZING_MODE_ENABLE_BY_MULTICOLOR;
|
||||
if (getCachedValue(paramName, paramDefault) != paramValue) {
|
||||
prefs.putInt(paramName, paramValue);
|
||||
updateCache(paramName, Integer.toString(paramValue));
|
||||
}
|
||||
|
||||
paramName = KEY_AUTO_TARGET_LEVEL;
|
||||
paramValue = dialog.cbTargetAutoChooseLevel.getSelectedIndex();
|
||||
paramDefault = AUTO_TARGET_NON_FEEL_BAD;
|
||||
String paramName = KEY_AUTO_TARGET_LEVEL;
|
||||
int paramValue = dialog.cbTargetAutoChooseLevel.getSelectedIndex();
|
||||
int paramDefault = AUTO_TARGET_NON_FEEL_BAD;
|
||||
if (getCachedValue(paramName, paramDefault) != paramValue) {
|
||||
prefs.putInt(paramName, paramValue);
|
||||
updateCache(paramName, Integer.toString(paramValue));
|
||||
|
|
@ -3151,10 +3086,6 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
private void showFullImagePathActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_showFullImagePathActionPerformed
|
||||
}//GEN-LAST:event_showFullImagePathActionPerformed
|
||||
|
||||
private void cbBattlefieldFeedbackColorizingModeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbBattlefieldFeedbackColorizingModeActionPerformed
|
||||
|
||||
}//GEN-LAST:event_cbBattlefieldFeedbackColorizingModeActionPerformed
|
||||
|
||||
private void cbSaveToZipFilesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbSaveToZipFilesActionPerformed
|
||||
// TODO add your handling code here:
|
||||
}//GEN-LAST:event_cbSaveToZipFilesActionPerformed
|
||||
|
|
@ -3289,27 +3220,15 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
load(prefs, dialog.nonLandPermanentsInOnePile, KEY_PERMANENTS_IN_ONE_PILE, "true");
|
||||
load(prefs, dialog.showPlayerNamesPermanently, KEY_SHOW_PLAYER_NAMES_PERMANENTLY, "true");
|
||||
load(prefs, dialog.displayLifeOnAvatar, KEY_DISPLAY_LIVE_ON_AVATAR, "true");
|
||||
load(prefs, dialog.showAbilityPickerForced, KEY_SHOW_ABILITY_PICKER_FORCED, "true");
|
||||
load(prefs, dialog.cbAllowRequestToShowHandCards, KEY_GAME_ALLOW_REQUEST_SHOW_HAND_CARDS, "true");
|
||||
load(prefs, dialog.cbConfirmEmptyManaPool, KEY_GAME_CONFIRM_EMPTY_MANA_POOL, "true");
|
||||
load(prefs, dialog.cbAskMoveToGraveOrder, KEY_GAME_ASK_MOVE_TO_GRAVE_ORDER, "true");
|
||||
|
||||
load(prefs, dialog.cbGameLogShowTurnInfo, KEY_GAME_LOG_SHOW_TURN_INFO, "true");
|
||||
load(prefs, dialog.cbGameLogAutoSave, KEY_GAME_LOG_AUTO_SAVE, "true");
|
||||
load(prefs, dialog.cbDraftLogAutoSave, KEY_DRAFT_LOG_AUTO_SAVE, "true");
|
||||
load(prefs, dialog.cbLimitedDeckAutoSave, KEY_LIMITED_DECK_AUTO_SAVE, "true");
|
||||
load(prefs, dialog.cbGameJsonLogAutoSave, KEY_JSON_GAME_LOG_AUTO_SAVE, "true", "false");
|
||||
|
||||
String feedbackParam = "";
|
||||
try {
|
||||
feedbackParam = MageFrame.getPreferences().get(KEY_BATTLEFIELD_FEEDBACK_COLORIZING_MODE, "2");
|
||||
int feedbackMode = Integer.parseInt(feedbackParam);
|
||||
dialog.cbBattlefieldFeedbackColorizingMode.setSelectedIndex(feedbackMode);
|
||||
} catch (Throwable e) {
|
||||
logger.error("Can't parse and setup param " + KEY_BATTLEFIELD_FEEDBACK_COLORIZING_MODE + " = " + feedbackParam, e);
|
||||
dialog.cbBattlefieldFeedbackColorizingMode.setSelectedIndex(BATTLEFIELD_FEEDBACK_COLORIZING_MODE_ENABLE_BY_MULTICOLOR);
|
||||
}
|
||||
|
||||
String autoTargetParam;
|
||||
try {
|
||||
autoTargetParam = MageFrame.getPreferences().get(KEY_AUTO_TARGET_LEVEL, "1");
|
||||
|
|
@ -3868,7 +3787,6 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
String userStrId = System.getProperty("user.name");
|
||||
return new UserData(UserGroup.PLAYER,
|
||||
PreferencesDialog.selectedAvatarId,
|
||||
PreferencesDialog.getCachedValue(PreferencesDialog.KEY_SHOW_ABILITY_PICKER_FORCED, "true").equals("true"),
|
||||
PreferencesDialog.getCachedValue(PreferencesDialog.KEY_GAME_ALLOW_REQUEST_SHOW_HAND_CARDS, "true").equals("true"),
|
||||
PreferencesDialog.getCachedValue(PreferencesDialog.KEY_GAME_CONFIRM_EMPTY_MANA_POOL, "true").equals("true"),
|
||||
getUserSkipPrioritySteps(),
|
||||
|
|
@ -3886,12 +3804,6 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
);
|
||||
}
|
||||
|
||||
public static int getBattlefieldFeedbackColorizingMode() {
|
||||
return PreferencesDialog.getCachedValue(
|
||||
PreferencesDialog.KEY_BATTLEFIELD_FEEDBACK_COLORIZING_MODE,
|
||||
BATTLEFIELD_FEEDBACK_COLORIZING_MODE_ENABLE_BY_MULTICOLOR);
|
||||
}
|
||||
|
||||
public List<KeyBindButton> getKeybindButtons() {
|
||||
return Arrays.asList(
|
||||
keyCancelSkip,
|
||||
|
|
@ -3919,7 +3831,6 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
private javax.swing.JCheckBox cbAllowRequestToShowHandCards;
|
||||
private javax.swing.JCheckBox cbAskMoveToGraveOrder;
|
||||
private javax.swing.JCheckBox cbAutoOrderTrigger;
|
||||
private javax.swing.JComboBox cbBattlefieldFeedbackColorizingMode;
|
||||
private javax.swing.JCheckBox cbCardRenderHideSetSymbol;
|
||||
private javax.swing.JCheckBox cbCardRenderIconsForAbilities;
|
||||
private javax.swing.JCheckBox cbCardRenderIconsForPlayable;
|
||||
|
|
@ -3935,7 +3846,6 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
private javax.swing.JCheckBox cbEnableSkipButtonsSounds;
|
||||
private javax.swing.JCheckBox cbGameJsonLogAutoSave;
|
||||
private javax.swing.JCheckBox cbGameLogAutoSave;
|
||||
private javax.swing.JCheckBox cbGameLogShowTurnInfo;
|
||||
private javax.swing.JCheckBox cbLimitedDeckAutoSave;
|
||||
private javax.swing.JComboBox cbNumberOfDownloadThreads;
|
||||
private javax.swing.JCheckBox cbPassPriorityActivation;
|
||||
|
|
@ -4067,14 +3977,12 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
private javax.swing.JLabel labelYourTurn;
|
||||
private javax.swing.JLabel lbSelectLabel;
|
||||
private javax.swing.JLabel lbThemeHint;
|
||||
private javax.swing.JLabel lblBattlefieldFeedbackColorizingMode;
|
||||
private javax.swing.JLabel lblProxyPassword;
|
||||
private javax.swing.JLabel lblProxyPort;
|
||||
private javax.swing.JLabel lblProxyServer;
|
||||
private javax.swing.JLabel lblProxyUserName;
|
||||
private javax.swing.JLabel lblTargetAutoChoose;
|
||||
private javax.swing.JLabel lebelSkip;
|
||||
private javax.swing.JPanel main_battlefield;
|
||||
private javax.swing.JPanel main_card;
|
||||
private javax.swing.JPanel main_game;
|
||||
private javax.swing.JPanel main_gamelog;
|
||||
|
|
@ -4115,7 +4023,6 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
private javax.swing.JButton sampleSize8;
|
||||
private javax.swing.JButton sampleSize9;
|
||||
private javax.swing.JButton saveButton;
|
||||
private javax.swing.JCheckBox showAbilityPickerForced;
|
||||
private javax.swing.JCheckBox showCardName;
|
||||
private javax.swing.JCheckBox showFullImagePath;
|
||||
private javax.swing.JCheckBox showPlayerNamesPermanently;
|
||||
|
|
|
|||
|
|
@ -319,7 +319,6 @@ public class HelperPanel extends JPanel {
|
|||
Color ACTIVE_FEEDBACK_BACKGROUND_COLOR_MAIN = new Color(0, 0, 255, 50);
|
||||
Color ACTIVE_FEEDBACK_BACKGROUND_COLOR_BATTLE = new Color(255, 0, 0, 50);
|
||||
Color ACTIVE_FEEDBACK_BACKGROUND_COLOR_OTHER = new Color(0, 255, 0, 50);
|
||||
int FEEDBACK_COLORIZING_MODE = PreferencesDialog.getBattlefieldFeedbackColorizingMode();
|
||||
|
||||
// cleanup current settings to default (flow layout - different sizes)
|
||||
this.buttonGrid.setLayout(new FlowLayout(FlowLayout.CENTER, BUTTONS_H_GAP, 0));
|
||||
|
|
@ -342,42 +341,23 @@ public class HelperPanel extends JPanel {
|
|||
// color panel on player's feedback waiting
|
||||
if (this.gameNeedFeedback) {
|
||||
|
||||
// wait player's action
|
||||
switch (FEEDBACK_COLORIZING_MODE) {
|
||||
case Constants.BATTLEFIELD_FEEDBACK_COLORIZING_MODE_DISABLE:
|
||||
// disabled
|
||||
this.mainPanel.setOpaque(false);
|
||||
this.mainPanel.setBorder(null);
|
||||
break;
|
||||
|
||||
case Constants.BATTLEFIELD_FEEDBACK_COLORIZING_MODE_ENABLE_BY_ONE_COLOR:
|
||||
// one color
|
||||
this.mainPanel.setOpaque(true);
|
||||
this.mainPanel.setBackground(ACTIVE_FEEDBACK_BACKGROUND_COLOR_OTHER);
|
||||
break;
|
||||
|
||||
case Constants.BATTLEFIELD_FEEDBACK_COLORIZING_MODE_ENABLE_BY_MULTICOLOR:
|
||||
// multicolor
|
||||
this.mainPanel.setOpaque(true);
|
||||
Color backColor = ACTIVE_FEEDBACK_BACKGROUND_COLOR_OTHER;
|
||||
if (this.gameTurnPhase != null) {
|
||||
switch (this.gameTurnPhase) {
|
||||
case PRECOMBAT_MAIN:
|
||||
case POSTCOMBAT_MAIN:
|
||||
backColor = ACTIVE_FEEDBACK_BACKGROUND_COLOR_MAIN;
|
||||
break;
|
||||
case COMBAT:
|
||||
backColor = ACTIVE_FEEDBACK_BACKGROUND_COLOR_BATTLE;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.mainPanel.setBackground(backColor);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
// wait player's action - colorize feedback panel (depends on current phase)
|
||||
this.mainPanel.setOpaque(true);
|
||||
Color backColor = ACTIVE_FEEDBACK_BACKGROUND_COLOR_OTHER;
|
||||
if (this.gameTurnPhase != null) {
|
||||
switch (this.gameTurnPhase) {
|
||||
case PRECOMBAT_MAIN:
|
||||
case POSTCOMBAT_MAIN:
|
||||
backColor = ACTIVE_FEEDBACK_BACKGROUND_COLOR_MAIN;
|
||||
break;
|
||||
case COMBAT:
|
||||
backColor = ACTIVE_FEEDBACK_BACKGROUND_COLOR_BATTLE;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.mainPanel.setBackground(backColor);
|
||||
} else {
|
||||
// inform about other players
|
||||
this.mainPanel.setOpaque(false);
|
||||
|
|
|
|||
|
|
@ -33,12 +33,6 @@ public class Connection {
|
|||
|
||||
private UserData userData;
|
||||
|
||||
// private int avatarId;
|
||||
// private boolean showAbilityPickerForced;
|
||||
// private boolean allowRequestShowHandCards;
|
||||
// private boolean confirmEmptyManaPool;
|
||||
// private String flagName;
|
||||
// private UserSkipPrioritySteps userSkipPrioritySteps;
|
||||
private static final String serialization = "?serializationtype=java";
|
||||
private static final String transport = "bisocket";
|
||||
private static final String threadpool = "onewayThreadPool=mage.remote.CustomThreadPool";
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ public class UserDataView implements Serializable {
|
|||
|
||||
protected int avatarId;
|
||||
protected int userGroup;
|
||||
protected boolean showAbilityPickerForced;
|
||||
protected boolean confirmEmptyManaPool;
|
||||
protected UserSkipPrioritySteps userSkipPrioritySteps;
|
||||
String flagName;
|
||||
|
|
@ -28,10 +27,9 @@ public class UserDataView implements Serializable {
|
|||
return new UserDataView(getDefaultUserData());
|
||||
}
|
||||
|
||||
public UserDataView(int avatarId, boolean showAbilityPickerForced, boolean allowRequestShowHandCards,
|
||||
public UserDataView(int avatarId, boolean allowRequestShowHandCards,
|
||||
boolean confirmEmptyManaPool, UserSkipPrioritySteps userSkipPrioritySteps, String flagName, boolean askMoveToGraveOrder) {
|
||||
this.avatarId = avatarId;
|
||||
this.showAbilityPickerForced = showAbilityPickerForced;
|
||||
this.userSkipPrioritySteps = userSkipPrioritySteps;
|
||||
this.confirmEmptyManaPool = confirmEmptyManaPool;
|
||||
this.flagName = flagName;
|
||||
|
|
@ -42,7 +40,6 @@ public class UserDataView implements Serializable {
|
|||
public UserDataView(UserData userData) {
|
||||
this.avatarId = userData.getAvatarId();
|
||||
this.userGroup = userData.getGroupId();
|
||||
this.showAbilityPickerForced = userData.isShowAbilityPickerForced();
|
||||
this.userSkipPrioritySteps = userData.getUserSkipPrioritySteps();
|
||||
this.confirmEmptyManaPool = userData.confirmEmptyManaPool();
|
||||
this.flagName = userData.getFlagName();
|
||||
|
|
@ -53,10 +50,6 @@ public class UserDataView implements Serializable {
|
|||
return avatarId;
|
||||
}
|
||||
|
||||
public boolean isShowAbilityPickerForced() {
|
||||
return showAbilityPickerForced;
|
||||
}
|
||||
|
||||
public UserSkipPrioritySteps getUserSkipPrioritySteps() {
|
||||
return userSkipPrioritySteps;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2410,42 +2410,35 @@ public class HumanPlayer extends PlayerImpl {
|
|||
|
||||
/**
|
||||
* Hide ability picker dialog on one available ability to activate
|
||||
*
|
||||
* @param ability
|
||||
* @param game
|
||||
* @return
|
||||
*/
|
||||
private boolean suppressAbilityPicker(ActivatedAbility ability, Game game) {
|
||||
if (getControllingPlayersUserData(game).isShowAbilityPickerForced()) {
|
||||
// TODO: is it bugged on mana payment + under control?
|
||||
// (if player under control then priority player must use own settings, not controlling)
|
||||
// user activated an ability picker in preferences
|
||||
// TODO: is it bugged on mana payment + under control?
|
||||
// (if player under control then priority player must use own settings, not controlling)
|
||||
// user activated an ability picker in preferences
|
||||
|
||||
// force to show ability picker for double faces cards in hand/commander/exile and other zones
|
||||
Card mainCard = game.getCard(CardUtil.getMainCardId(game, ability.getSourceId()));
|
||||
if (mainCard != null && !Zone.BATTLEFIELD.equals(game.getState().getZone(mainCard.getId()))) {
|
||||
if (mainCard instanceof SplitCard
|
||||
|| mainCard instanceof AdventureCard
|
||||
|| mainCard instanceof ModalDoubleFacedCard) {
|
||||
return false;
|
||||
}
|
||||
// force to show ability picker for double faces cards in hand/commander/exile and other zones
|
||||
Card mainCard = game.getCard(CardUtil.getMainCardId(game, ability.getSourceId()));
|
||||
if (mainCard != null && !Zone.BATTLEFIELD.equals(game.getState().getZone(mainCard.getId()))) {
|
||||
if (mainCard instanceof SplitCard
|
||||
|| mainCard instanceof AdventureCard
|
||||
|| mainCard instanceof ModalDoubleFacedCard) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// hide on land play
|
||||
if (ability instanceof PlayLandAbility) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// hide on alternative cost activated
|
||||
if (!getCastSourceIdWithAlternateMana().getOrDefault(ability.getSourceId(), Collections.emptySet()).contains(MageIdentifier.Default)
|
||||
&& ability.getManaCostsToPay().manaValue() > 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// hide on mana activate and show all other
|
||||
return ability.isManaActivatedAbility();
|
||||
}
|
||||
return true;
|
||||
|
||||
// hide on land play
|
||||
if (ability instanceof PlayLandAbility) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// hide on alternative cost activated
|
||||
if (!getCastSourceIdWithAlternateMana().getOrDefault(ability.getSourceId(), Collections.emptySet()).contains(MageIdentifier.Default)
|
||||
&& ability.getManaCostsToPay().manaValue() > 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// hide on mana activate and show all other
|
||||
return ability.isManaActivatedAbility();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ public class UserData implements Serializable {
|
|||
|
||||
protected int groupId;
|
||||
protected int avatarId;
|
||||
protected boolean showAbilityPickerForced;
|
||||
protected boolean allowRequestShowHandCards;
|
||||
protected boolean confirmEmptyManaPool;
|
||||
protected UserSkipPrioritySteps userSkipPrioritySteps;
|
||||
|
|
@ -40,7 +39,6 @@ public class UserData implements Serializable {
|
|||
|
||||
public UserData(UserGroup userGroup,
|
||||
int avatarId,
|
||||
boolean showAbilityPickerForced,
|
||||
boolean allowRequestShowHandCards,
|
||||
boolean confirmEmptyManaPool,
|
||||
UserSkipPrioritySteps userSkipPrioritySteps,
|
||||
|
|
@ -57,7 +55,6 @@ public class UserData implements Serializable {
|
|||
String userIdStr) {
|
||||
this.groupId = userGroup.getGroupId();
|
||||
this.avatarId = avatarId;
|
||||
this.showAbilityPickerForced = showAbilityPickerForced;
|
||||
this.allowRequestShowHandCards = allowRequestShowHandCards;
|
||||
this.userSkipPrioritySteps = userSkipPrioritySteps;
|
||||
this.confirmEmptyManaPool = confirmEmptyManaPool;
|
||||
|
|
@ -82,7 +79,6 @@ public class UserData implements Serializable {
|
|||
public void update(UserData userData) {
|
||||
this.groupId = userData.groupId;
|
||||
this.avatarId = userData.avatarId;
|
||||
this.showAbilityPickerForced = userData.showAbilityPickerForced;
|
||||
this.allowRequestShowHandCards = userData.allowRequestShowHandCards;
|
||||
this.userSkipPrioritySteps = userData.userSkipPrioritySteps;
|
||||
this.confirmEmptyManaPool = userData.confirmEmptyManaPool;
|
||||
|
|
@ -105,7 +101,6 @@ public class UserData implements Serializable {
|
|||
UserGroup.DEFAULT,
|
||||
0,
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
new UserSkipPrioritySteps(),
|
||||
getDefaultFlagName(),
|
||||
|
|
@ -138,14 +133,6 @@ public class UserData implements Serializable {
|
|||
this.avatarId = avatarId;
|
||||
}
|
||||
|
||||
public boolean isShowAbilityPickerForced() {
|
||||
return showAbilityPickerForced;
|
||||
}
|
||||
|
||||
public void setShowAbilityPickerForced(boolean showAbilityPickerForced) {
|
||||
this.showAbilityPickerForced = showAbilityPickerForced;
|
||||
}
|
||||
|
||||
public boolean isAllowRequestHandToAll() {
|
||||
return allowRequestShowHandCards;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue