mirror of
https://github.com/magefree/mage.git
synced 2025-12-28 22:42:03 -08:00
fix #11643 (choice for add mana of any type produced)
This commit is contained in:
parent
dba8725b26
commit
341d8b9add
2 changed files with 68 additions and 8 deletions
|
|
@ -100,14 +100,18 @@ public class AddManaOfAnyTypeProducedEffect extends ManaEffect {
|
|||
choice.getChoices().add("Colorless");
|
||||
}
|
||||
|
||||
if (choice.getChoices().isEmpty()) {
|
||||
return newMana;
|
||||
switch (choice.getChoices().size()) {
|
||||
case 0: // no mana possible to add
|
||||
return newMana;
|
||||
case 1: // no choice necessary for one option
|
||||
choice.setChoice(choice.getChoices().iterator().next());
|
||||
break;
|
||||
default:
|
||||
// attempt to make choice
|
||||
if (!targetController.choose(outcome, choice, game)) {
|
||||
return newMana; // no mana if no choice made
|
||||
}
|
||||
}
|
||||
if (choice.getChoices().size() != 1
|
||||
&& !targetController.choose(outcome, choice, game)) {
|
||||
return newMana;
|
||||
}
|
||||
choice.setChoice(choice.getChoices().iterator().next());
|
||||
|
||||
switch (choice.getChoice()) {
|
||||
case "White":
|
||||
|
|
@ -128,6 +132,7 @@ public class AddManaOfAnyTypeProducedEffect extends ManaEffect {
|
|||
case "Colorless":
|
||||
newMana.setColorless(1);
|
||||
break;
|
||||
default:
|
||||
}
|
||||
return newMana;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue