Merge pull request #5145 from spjspj/master

Check if there are actually different replacement effects and only ask then if there are.  Having two Mana Reflections out makes the game unplayable atm.
This commit is contained in:
spjspj 2018-07-12 23:30:30 +10:00 committed by GitHub
commit aae3930ef4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -341,8 +341,18 @@ public class HumanPlayer extends PlayerImpl {
replacementEffectChoice.getChoices().clear();
replacementEffectChoice.setKeyChoices(rEffects);
// Check if there are different ones
int differentChoices = 0;
String lastChoice = "";
for (String value : replacementEffectChoice.getKeyChoices().values()) {
if (!lastChoice.equalsIgnoreCase(value)) {
lastChoice = value;
differentChoices++;
}
}
while (!abort) {
while (!abort && differentChoices > 1) {
updateGameStatePriority("chooseEffect", game);
prepareForResponse(game);
if (!isExecutingMacro()) {