diff --git a/Mage.Client/src/main/java/mage/client/MageFrame.java b/Mage.Client/src/main/java/mage/client/MageFrame.java index 83379b706a..5bce5e28b8 100644 --- a/Mage.Client/src/main/java/mage/client/MageFrame.java +++ b/Mage.Client/src/main/java/mage/client/MageFrame.java @@ -693,7 +693,8 @@ public class MageFrame extends javax.swing.JFrame implements MageClient { ProxyType proxyType = Connection.ProxyType.valueByText(prefs.get("proxyType", "None")); String proxyUsername = prefs.get("proxyUsername", ""); String proxyPassword = prefs.get("proxyPassword", ""); - + int avatarId = PreferencesDialog.getSelectedAvatar(); + boolean showAbilityPickerForced = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_SHOW_ABILITY_PICKER_FORCED, "true").equals("true"); try { setCursor(new Cursor(Cursor.WAIT_CURSOR)); Connection connection = new Connection(); @@ -705,6 +706,8 @@ public class MageFrame extends javax.swing.JFrame implements MageClient { connection.setProxyPort(proxyPort); connection.setProxyUsername(proxyUsername); connection.setProxyPassword(proxyPassword); + connection.setAvatarId(avatarId); + connection.setShowAbilityPickerForced(showAbilityPickerForced); logger.debug("connecting (auto): " + proxyType + " " + proxyServer + " " + proxyPort + " " + proxyUsername); if (MageFrame.connect(connection)) { return true; diff --git a/Mage.Client/src/main/java/mage/client/cards/CardsList.java b/Mage.Client/src/main/java/mage/client/cards/CardsList.java index 210394c144..48aca1b371 100644 --- a/Mage.Client/src/main/java/mage/client/cards/CardsList.java +++ b/Mage.Client/src/main/java/mage/client/cards/CardsList.java @@ -199,7 +199,7 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar this.bigCard = bigCard; this.gameId = gameId; - boolean piles = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_DRAFT_PILES_TOGGLE, "True").equals("True"); + boolean piles = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_DRAFT_PILES_TOGGLE, "true").equals("true"); cbSortBy.setSelectedItem(sortSetting.getSortBy()); chkPiles.setSelected(piles); currentView.loadCards(showCards, sortSetting, piles, bigCard, gameId); diff --git a/Mage.Client/src/main/java/mage/client/dialog/ConnectDialog.java b/Mage.Client/src/main/java/mage/client/dialog/ConnectDialog.java index dfc88f4000..48e69336be 100644 --- a/Mage.Client/src/main/java/mage/client/dialog/ConnectDialog.java +++ b/Mage.Client/src/main/java/mage/client/dialog/ConnectDialog.java @@ -302,10 +302,11 @@ public class ConnectDialog extends MageDialog { } } - // Avatar + // pref settings int avatarId = PreferencesDialog.getSelectedAvatar(); connection.setAvatarId(avatarId); - + boolean showAbilityPickerForced = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_SHOW_ABILITY_PICKER_FORCED, "true").equals("true"); + connection.setShowAbilityPickerForced(showAbilityPickerForced); logger.debug("connecting: " + connection.getProxyType() + " " + connection.getProxyHost() + " " + connection.getProxyPort()); task = new ConnectTask(); task.execute(); diff --git a/Mage.Client/src/main/java/mage/client/dialog/PreferencesDialog.form b/Mage.Client/src/main/java/mage/client/dialog/PreferencesDialog.form index d5c8dc49bb..b81d900fa4 100644 --- a/Mage.Client/src/main/java/mage/client/dialog/PreferencesDialog.form +++ b/Mage.Client/src/main/java/mage/client/dialog/PreferencesDialog.form @@ -194,8 +194,8 @@ - - + + 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 b0320f4d09..ead7b565af 100644 --- a/Mage.Client/src/main/java/mage/client/dialog/PreferencesDialog.java +++ b/Mage.Client/src/main/java/mage/client/dialog/PreferencesDialog.java @@ -412,8 +412,8 @@ public class PreferencesDialog extends javax.swing.JDialog { main_game.add(showPlayerNamesPermanently, java.awt.BorderLayout.LINE_START); showAbilityPickerForced.setSelected(true); - showAbilityPickerForced.setText("Show ability picker for abilities without costs"); - showAbilityPickerForced.setToolTipText("This prevents that you accidently activate abilities without costs that e.g. tap the permanent."); + showAbilityPickerForced.setText("Show ability picker for abilities or spells without costs"); + showAbilityPickerForced.setToolTipText("This prevents you from accidently activating abilities without other costs than tapping or casting spells with 0 mana costs."); showAbilityPickerForced.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); showAbilityPickerForced.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { @@ -1667,6 +1667,7 @@ public class PreferencesDialog extends javax.swing.JDialog { load(prefs, dialog.checkBoxEndOfCOthers, PhaseManager.END_OF_COMBAT_OTHERS); load(prefs, dialog.checkBoxMain2Others, PhaseManager.MAIN_2_OTHERS); load(prefs, dialog.checkBoxEndTurnOthers, PhaseManager.END_OF_TURN_OTHERS); + load(prefs, dialog.displayBigCardsInHand, KEY_HAND_USE_BIG_CARDS, "true"); load(prefs, dialog.showToolTipsInAnyZone, KEY_SHOW_TOOLTIPS_ANY_ZONE, "true"); load(prefs, dialog.nonLandPermanentsInOnePile, KEY_PERMANENTS_IN_ONE_PILE, "true"); diff --git a/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java b/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java index fb3161b714..570606c750 100644 --- a/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java +++ b/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java @@ -30,7 +30,6 @@ package mage.player.human; import java.io.Serializable; import java.util.ArrayList; -import java.util.Collection; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.List; @@ -829,9 +828,14 @@ public class HumanPlayer extends PlayerImpl { if (ability instanceof PlayLandAbility) { return true; } + if (ability.getManaCostsToPay().convertedManaCost() > 0) { + return true; + } + if (ability instanceof ManaAbility) { + return true; + } for(Cost cost : ability.getCosts() ) { - if (!(cost instanceof TapSourceCost) - || !((cost instanceof ManaCosts) && ((ManaCosts)cost).convertedManaCost() >0)) { + if (!(cost instanceof TapSourceCost)) { // if cost exists that have to be paid, pick ability dialog can be suppressed return true; } diff --git a/Mage.Server/src/main/java/mage/server/Session.java b/Mage.Server/src/main/java/mage/server/Session.java index bb23065c92..e88deb5617 100644 --- a/Mage.Server/src/main/java/mage/server/Session.java +++ b/Mage.Server/src/main/java/mage/server/Session.java @@ -120,9 +120,14 @@ public class Session { public boolean setUserData(String userName, UserDataView userDataView) { User user = UserManager.getInstance().findUser(userName); if (user != null) { - UserData userData = new UserData(UserGroup.PLAYER, userDataView.getAvatarId(), userDataView.isShowAbilityPickerForced()); - updateAvatar(userName, userData); - user.setUserData(userData); + UserData userData = user.getUserData(); + if (userData == null) { + userData = new UserData(UserGroup.PLAYER, userDataView.getAvatarId(), userDataView.isShowAbilityPickerForced()); + user.setUserData(userData); + } else { + userData.setAvatarId(userDataView.getAvatarId()); + userData.setShowAbilityPickerForced(userDataView.isShowAbilityPickerForced()); + } return true; } return false;