updated Apex Observatory to work correctly with double-faced cards with different card type.

This commit is contained in:
Jeff Wadsworth 2024-07-30 13:50:26 -05:00
parent fa24f8f53b
commit fad63389d0

View file

@ -112,7 +112,14 @@ class ChooseCardTypeEffect extends OneShotEffect {
sharedCardTypes.add(entry.getKey()); sharedCardTypes.add(entry.getKey());
} }
} }
// handle situations like the double-faced instant/land Jwari Disruption // Jwari Ruins
if (sharedCardTypes.isEmpty()) {
game.informPlayers(mageObject.getIdName() + " No exiled cards shared a type in exile, so nothing is done.");
if (mageObject instanceof Permanent) {
((Permanent) mageObject).addInfo("chosen type", CardUtil.addToolTipMarkTags("No exiled cards have the same card type."), game);
}
return false;
}
cardTypeChoice.getChoices().retainAll(sharedCardTypes); cardTypeChoice.getChoices().retainAll(sharedCardTypes);
if (controller.choose(Outcome.Benefit, cardTypeChoice, game)) { if (controller.choose(Outcome.Benefit, cardTypeChoice, game)) {
if (!game.isSimulation()) { if (!game.isSimulation()) {