From 2ab78b9f03ffa39c865821555ac0fad6a9f5242a Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Sun, 27 Jun 2021 11:46:36 -0400 Subject: [PATCH] [STX] fixed Shadrix Silverquill not allowing players to choose no modes (fixes #7874) --- .../Mage.Player.Human/src/mage/player/human/HumanPlayer.java | 4 ++-- Mage/src/main/java/mage/abilities/Modes.java | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) 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 9ff3a57443..bf82021884 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 @@ -49,8 +49,8 @@ import org.apache.log4j.Logger; import java.awt.*; import java.io.Serializable; -import java.util.*; import java.util.List; +import java.util.*; import java.util.concurrent.ConcurrentLinkedQueue; import java.util.stream.Collectors; @@ -2178,7 +2178,7 @@ public class HumanPlayer extends PlayerImpl { if (modes.size() > 1) { // done option for up to choices - boolean canEndChoice = modes.getSelectedModes().size() >= modes.getMinModes(); + boolean canEndChoice = modes.getSelectedModes().size() >= modes.getMinModes() || modes.isMayChooseNone(); MageObject obj = game.getObject(source.getSourceId()); Map modeMap = new LinkedHashMap<>(); int modeIndex = 0; diff --git a/Mage/src/main/java/mage/abilities/Modes.java b/Mage/src/main/java/mage/abilities/Modes.java index 4230bee2e9..dc72411508 100644 --- a/Mage/src/main/java/mage/abilities/Modes.java +++ b/Mage/src/main/java/mage/abilities/Modes.java @@ -547,4 +547,8 @@ public class Modes extends LinkedHashMap { public void setMayChooseNone(boolean mayChooseNone) { this.mayChooseNone = mayChooseNone; } + + public boolean isMayChooseNone() { + return mayChooseNone; + } }