From bfc66ff3f3202a906c77a0f0d79d5fd22ba69f6c Mon Sep 17 00:00:00 2001 From: spjspj Date: Thu, 7 Apr 2016 15:29:18 +1000 Subject: [PATCH] spjspj - Further fixes for useFirstManaAbility --- .../main/java/mage/client/dialog/PreferencesDialog.java | 3 ++- Mage.Client/src/main/java/mage/client/game/GamePanel.java | 7 ++++--- Mage/src/main/java/mage/players/net/UserData.java | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Mage.Client/src/main/java/mage/client/dialog/PreferencesDialog.java b/Mage.Client/src/main/java/mage/client/dialog/PreferencesDialog.java index 8b5f714938..2d423c03b4 100644 --- a/Mage.Client/src/main/java/mage/client/dialog/PreferencesDialog.java +++ b/Mage.Client/src/main/java/mage/client/dialog/PreferencesDialog.java @@ -3275,7 +3275,8 @@ public class PreferencesDialog extends javax.swing.JDialog { PreferencesDialog.getCachedValue(PreferencesDialog.KEY_PASS_PRIORITY_CAST, "true").equals("true"), PreferencesDialog.getCachedValue(PreferencesDialog.KEY_PASS_PRIORITY_ACTIVATION, "true").equals("true"), PreferencesDialog.getCachedValue(PreferencesDialog.KEY_AUTO_ORDER_TRIGGER, "true").equals("true"), - false + PreferencesDialog.getCachedValue(PreferencesDialog.KEY_USE_FIRST_MANA_ABILITY, "false").equals("true") + ); } diff --git a/Mage.Client/src/main/java/mage/client/game/GamePanel.java b/Mage.Client/src/main/java/mage/client/game/GamePanel.java index b28310e9e7..434be70044 100644 --- a/Mage.Client/src/main/java/mage/client/game/GamePanel.java +++ b/Mage.Client/src/main/java/mage/client/game/GamePanel.java @@ -98,6 +98,7 @@ import mage.client.dialog.PickPileDialog; import mage.client.dialog.PreferencesDialog; import static mage.client.dialog.PreferencesDialog.KEY_GAME_MANA_AUTOPAYMENT; import static mage.client.dialog.PreferencesDialog.KEY_GAME_MANA_AUTOPAYMENT_ONLY_ONE; +import static mage.client.dialog.PreferencesDialog.KEY_USE_FIRST_MANA_ABILITY; import mage.client.dialog.ShowCardsDialog; import mage.client.game.FeedbackPanel.FeedbackMode; import mage.client.plugins.adapters.MageActionCallback; @@ -596,7 +597,7 @@ public final class GamePanel extends javax.swing.JPanel { setMenuStates( PreferencesDialog.getCachedValue(KEY_GAME_MANA_AUTOPAYMENT, "true").equals("true"), PreferencesDialog.getCachedValue(KEY_GAME_MANA_AUTOPAYMENT_ONLY_ONE, "true").equals("true"), - false + PreferencesDialog.getCachedValue(KEY_USE_FIRST_MANA_ABILITY, "false").equals("true") ); updateGame(game); @@ -1602,7 +1603,7 @@ public final class GamePanel extends javax.swing.JPanel { setMenuStates( PreferencesDialog.getCachedValue(KEY_GAME_MANA_AUTOPAYMENT, "true").equals("true"), PreferencesDialog.getCachedValue(KEY_GAME_MANA_AUTOPAYMENT_ONLY_ONE, "true").equals("true"), - true); + PreferencesDialog.getCachedValue(KEY_USE_FIRST_MANA_ABILITY, "false").equals("true")); } }); @@ -1645,7 +1646,7 @@ public final class GamePanel extends javax.swing.JPanel { setMenuStates( PreferencesDialog.getCachedValue(KEY_GAME_MANA_AUTOPAYMENT, "true").equals("true"), PreferencesDialog.getCachedValue(KEY_GAME_MANA_AUTOPAYMENT_ONLY_ONE, "true").equals("true"), - false); + PreferencesDialog.getCachedValue(KEY_USE_FIRST_MANA_ABILITY, "false").equals("true")); } }); diff --git a/Mage/src/main/java/mage/players/net/UserData.java b/Mage/src/main/java/mage/players/net/UserData.java index f0e90229a9..592141054b 100644 --- a/Mage/src/main/java/mage/players/net/UserData.java +++ b/Mage/src/main/java/mage/players/net/UserData.java @@ -22,7 +22,7 @@ public class UserData implements Serializable { protected boolean passPriorityCast; protected boolean passPriorityActivation; protected boolean autoOrderTrigger; - protected boolean useFirstManaAbility; + protected boolean useFirstManaAbility = false; protected String matchHistory; protected int matchQuitRatio;