mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 10:48:00 +00:00
CountersPutEffect: fixes ChoiceAmount when it can be Zero
This commit is contained in:
@@ -162,14 +162,17 @@ public class CountersPutEffect extends SpellAbilityEffect {
|
|||||||
chooser = choosers.get(0);
|
chooser = choosers.get(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
CardCollection choices = new CardCollection(game.getCardsIn(choiceZone));
|
|
||||||
|
|
||||||
int n = AbilityUtils.calculateAmount(sa.getHostCard(), sa.getParamOrDefault("ChoiceAmount",
|
int n = AbilityUtils.calculateAmount(sa.getHostCard(), sa.getParamOrDefault("ChoiceAmount",
|
||||||
"1"), sa);
|
"1"), sa);
|
||||||
int m = AbilityUtils.calculateAmount(sa.getHostCard(), sa.getParamOrDefault("MinChoiceAmount",
|
int m = AbilityUtils.calculateAmount(sa.getHostCard(), sa.getParamOrDefault("MinChoiceAmount",
|
||||||
sa.getParamOrDefault("ChoiceAmount", "1")), sa);
|
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") + " ";
|
String title = Localizer.getInstance().getMessage("lblChooseaCard") + " ";
|
||||||
if (sa.hasParam("ChoiceTitle")) {
|
if (sa.hasParam("ChoiceTitle")) {
|
||||||
|
|||||||
Reference in New Issue
Block a user