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
This commit is contained in:
PurpleCrowbar 2025-04-03 18:34:04 +01:00 committed by GitHub
parent 35b0ae8abd
commit dfb6896453
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 9 additions and 8 deletions

View file

@ -2621,19 +2621,19 @@
<Component class="javax.swing.JCheckBox" name="cbStopBlockWithAny">
<Properties>
<Property name="selected" type="boolean" value="true"/>
<Property name="text" type="java.lang.String" value="STOP skips on declare blockers if ANY blockers are available"/>
<Property name="text" type="java.lang.String" value="STOP skips when attacked and on declare blockers if ANY blockers are available"/>
<Property name="actionCommand" type="java.lang.String" value=""/>
</Properties>
</Component>
<Component class="javax.swing.JCheckBox" name="cbStopBlockWithZero">
<Properties>
<Property name="text" type="java.lang.String" value="STOP skips on declare blockers if ZERO blockers are available"/>
<Property name="text" type="java.lang.String" value="STOP skips when attacked if ZERO blockers are available"/>
<Property name="actionCommand" type="java.lang.String" value=""/>
</Properties>
</Component>
<Component class="javax.swing.JCheckBox" name="cbStopOnNewStackObjects">
<Properties>
<Property name="text" type="java.lang.String" value="Skip to STACK resolved (F10): stop on new objects added (on) or stop until empty (off)"/>
<Property name="text" type="java.lang.String" value="Skip to STACK resolved (F10): stop on new objects added (on) or stop when stack empty (off)"/>
<Property name="actionCommand" type="java.lang.String" value=""/>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[300, 25]"/>

View file

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

View file

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