From dfb68964531d9d1416518ae90524842a1d4028b4 Mon Sep 17 00:00:00 2001 From: PurpleCrowbar <26198472+PurpleCrowbar@users.noreply.github.com> Date: Thu, 3 Apr 2025 18:34:04 +0100 Subject: [PATCH] Skip prompting player with no blockers to select blockers (#13496) * Don't prompt creatureless player to select blockers * Move getting possible blockers back to while loop * Several preferences text improvements, always skip select blockers prompt if no blockers --- .../src/main/java/mage/client/dialog/PreferencesDialog.form | 6 +++--- .../src/main/java/mage/client/dialog/PreferencesDialog.java | 6 +++--- .../src/mage/player/human/HumanPlayer.java | 5 +++-- 3 files changed, 9 insertions(+), 8 deletions(-) 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 2fb5afdb761..0138479d0b1 100644 --- a/Mage.Client/src/main/java/mage/client/dialog/PreferencesDialog.form +++ b/Mage.Client/src/main/java/mage/client/dialog/PreferencesDialog.form @@ -2621,19 +2621,19 @@ - + - + - + 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 94238a49468..1a0b396cc53 100644 --- a/Mage.Client/src/main/java/mage/client/dialog/PreferencesDialog.java +++ b/Mage.Client/src/main/java/mage/client/dialog/PreferencesDialog.java @@ -2396,15 +2396,15 @@ public class PreferencesDialog extends javax.swing.JDialog { phases_stopSettings.add(cbStopAttack); cbStopBlockWithAny.setSelected(true); - cbStopBlockWithAny.setText("STOP skips on declare blockers if ANY blockers are available"); + cbStopBlockWithAny.setText("STOP skips when attacked and on declare blockers if ANY blockers are available"); cbStopBlockWithAny.setActionCommand(""); phases_stopSettings.add(cbStopBlockWithAny); - cbStopBlockWithZero.setText("STOP skips on declare blockers if ZERO blockers are available"); + cbStopBlockWithZero.setText("STOP skips when attacked if ZERO blockers are available"); cbStopBlockWithZero.setActionCommand(""); phases_stopSettings.add(cbStopBlockWithZero); - cbStopOnNewStackObjects.setText("Skip to STACK resolved (F10): stop on new objects added (on) or stop until empty (off)"); + cbStopOnNewStackObjects.setText("Skip to STACK resolved (F10): stop on new objects added (on) or stop when stack empty (off)"); cbStopOnNewStackObjects.setActionCommand(""); cbStopOnNewStackObjects.setPreferredSize(new java.awt.Dimension(300, 25)); phases_stopSettings.add(cbStopOnNewStackObjects); 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 f035a45fe6b..7115082ba57 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 @@ -2072,7 +2072,6 @@ public class HumanPlayer extends PlayerImpl { // stop skip on any/zero permanents available int possibleBlockersCount = game.getBattlefield().count(filter, playerId, source, game); boolean canStopOnAny = possibleBlockersCount != 0 && getControllingPlayersUserData(game).getUserSkipPrioritySteps().isStopOnDeclareBlockersWithAnyPermanents(); - boolean canStopOnZero = possibleBlockersCount == 0 && getControllingPlayersUserData(game).getUserSkipPrioritySteps().isStopOnDeclareBlockersWithZeroPermanents(); // skip declare blocker step // as opposed to declare attacker - it can be skipped by ANY skip button TODO: make same for declare attackers and rework skip buttons (normal and forced) @@ -2081,9 +2080,11 @@ public class HumanPlayer extends PlayerImpl { || passedTurn || passedUntilEndOfTurn || passedUntilNextMain; - if (skipButtonActivated && !canStopOnAny && !canStopOnZero) { + if (skipButtonActivated && !canStopOnAny) { return; } + // Skip prompt to select blockers if player has none + if (possibleBlockersCount == 0) return; while (canRespond()) { prepareForResponse(game);