CountersPutEffect: fixes ChoiceAmount when it can be Zero

This commit is contained in:
Hans Mackowiak
2021-03-13 21:39:35 +01:00
parent ccdb9090b5
commit 84aaccc3da

View File

@@ -162,14 +162,17 @@ public class CountersPutEffect extends SpellAbilityEffect {
chooser = choosers.get(0);
}
CardCollection choices = new CardCollection(game.getCardsIn(choiceZone));
int n = AbilityUtils.calculateAmount(sa.getHostCard(), sa.getParamOrDefault("ChoiceAmount",
"1"), sa);
int m = AbilityUtils.calculateAmount(sa.getHostCard(), sa.getParamOrDefault("MinChoiceAmount",
sa.getParamOrDefault("ChoiceAmount", "1")), sa);
choices = CardLists.getValidCards(choices, sa.getParam("Choices"), activator, card, sa);
// no choices allowed
if (n <= 0) {
return;
}
CardCollection choices = CardLists.getValidCards(game.getCardsIn(choiceZone), sa.getParam("Choices"), activator, card, sa);
String title = Localizer.getInstance().getMessage("lblChooseaCard") + " ";
if (sa.hasParam("ChoiceTitle")) {