Skip to content

Commit

Permalink
Naked Singularity - fixed game error on usage with multi subtypes land;
Browse files Browse the repository at this point in the history
  • Loading branch information
JayDi85 committed Sep 23, 2023
1 parent 2ceb272 commit 81039d6
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions Mage.Sets/src/mage/cards/n/NakedSingularity.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,20 @@ public boolean replaceEvent(GameEvent event, Ability source, Game game) {
if (permanent.hasSubtype(SubType.FOREST, game)) {
choice.getChoices().add("Black");
}

String chosenColor;
if (choice.getChoices().size() == 1) {
chosenColor = choice.getChoices().iterator().next();
} else if (choice.getChoices().size() == 0) {
chosenColor = null;
} else {
controller.choose(Outcome.PutManaInPool, choice, game);
chosenColor = choice.getChoice();
// workaround to skip choose dialog in check playable state
if (game.inCheckPlayableState()) {
chosenColor = "Any";
} else {
controller.choose(Outcome.PutManaInPool, choice, game);
chosenColor = choice.getChoice();
}
}
if (chosenColor == null) {
return false;
Expand All @@ -123,6 +131,9 @@ public boolean replaceEvent(GameEvent event, Ability source, Game game) {
case "Green":
mana.setToMana(Mana.GreenMana(amount));
break;
case "Any":
mana.setToMana(Mana.AnyMana(amount));
break;
}
return false;
}
Expand Down

0 comments on commit 81039d6

Please sign in to comment.