From 6853d680166f7efecfd05ee8246bfed4d077c72d Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Tue, 19 Aug 2014 16:35:49 +0200 Subject: [PATCH] * Xenagos, the Reveler - Fixed handling of card selection to be optional. --- .../src/mage/sets/theros/XenagosTheReveler.java | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/Mage.Sets/src/mage/sets/theros/XenagosTheReveler.java b/Mage.Sets/src/mage/sets/theros/XenagosTheReveler.java index 81fdc4005f..83115dee50 100644 --- a/Mage.Sets/src/mage/sets/theros/XenagosTheReveler.java +++ b/Mage.Sets/src/mage/sets/theros/XenagosTheReveler.java @@ -200,17 +200,16 @@ class XenagosExileEffect extends OneShotEffect { FilterCard filter = new FilterCard("creature and/or land cards to put onto the battlefield"); filter.add(Predicates.or(new CardTypePredicate(CardType.CREATURE), new CardTypePredicate(CardType.LAND))); - - TargetCard target1 = new TargetCard(Zone.EXILED, filter); - while (cards.size() > 0 + TargetCard target1 = new TargetCard(0, Integer.MAX_VALUE, Zone.EXILED, filter); + if (cards.size() > 0 && target1.canChoose(source.getSourceId(), source.getControllerId(), game) && player.choose(Outcome.PutCardInPlay, cards, target1, game)) { - Card card = cards.get(target1.getFirstTarget(), game); - if (card != null) { - cards.remove(card); - card.putOntoBattlefield(game, Zone.EXILED, source.getSourceId(), source.getControllerId()); + for (UUID targetId: target1.getTargets()) { + Card card = cards.get(targetId, game); + if (card != null) { + player.putOntoBattlefieldWithInfo(card, game, Zone.EXILED, source.getSourceId()); + } } - target1.clearChosen(); } return true; }