Support "ChoicePrompt" for GenericChoice

This commit is contained in:
Northmoc
2021-07-28 09:36:16 -04:00
parent d58191283e
commit bd7ab26f3e

View File

@@ -66,10 +66,11 @@ public class ChooseGenericEffect extends SpellAbilityEffect {
} }
List<SpellAbility> chosenSAs = Lists.newArrayList(); List<SpellAbility> chosenSAs = Lists.newArrayList();
String prompt = sa.hasParam("ChoicePrompt") ? sa.getParam("ChoicePrompt") : "Choose";
if (sa.hasParam("AtRandom")) { if (sa.hasParam("AtRandom")) {
Aggregates.random(abilities, amount, chosenSAs); Aggregates.random(abilities, amount, chosenSAs);
} else { } else {
chosenSAs = p.getController().chooseSpellAbilitiesForEffect(abilities, sa, "Choose", amount, ImmutableMap.of()); chosenSAs = p.getController().chooseSpellAbilitiesForEffect(abilities, sa, prompt, amount, ImmutableMap.of());
} }
if (!chosenSAs.isEmpty()) { if (!chosenSAs.isEmpty()) {