[STX] fixed Shadrix Silverquill not allowing players to choose no modes (fixes #7874)

This commit is contained in:
Evan Kranzler 2021-06-27 11:46:36 -04:00
parent 58c447f929
commit 2ab78b9f03
2 changed files with 6 additions and 2 deletions

View file

@ -49,8 +49,8 @@ import org.apache.log4j.Logger;
import java.awt.*; import java.awt.*;
import java.io.Serializable; import java.io.Serializable;
import java.util.*;
import java.util.List; import java.util.List;
import java.util.*;
import java.util.concurrent.ConcurrentLinkedQueue; import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -2178,7 +2178,7 @@ public class HumanPlayer extends PlayerImpl {
if (modes.size() > 1) { if (modes.size() > 1) {
// done option for up to choices // 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()); MageObject obj = game.getObject(source.getSourceId());
Map<UUID, String> modeMap = new LinkedHashMap<>(); Map<UUID, String> modeMap = new LinkedHashMap<>();
int modeIndex = 0; int modeIndex = 0;

View file

@ -547,4 +547,8 @@ public class Modes extends LinkedHashMap<UUID, Mode> {
public void setMayChooseNone(boolean mayChooseNone) { public void setMayChooseNone(boolean mayChooseNone) {
this.mayChooseNone = mayChooseNone; this.mayChooseNone = mayChooseNone;
} }
public boolean isMayChooseNone() {
return mayChooseNone;
}
} }