From 6b817b0669c2f362c3ad4d0e8eff3d78bf48e019 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Thu, 5 Jun 2014 23:16:14 +0200 Subject: [PATCH] * Congregation at Dawn - Fixed a bug that the game is locked while resolution of the put cards back effect. --- .../src/mage/sets/ravnika/CongregationAtDawn.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Mage.Sets/src/mage/sets/ravnika/CongregationAtDawn.java b/Mage.Sets/src/mage/sets/ravnika/CongregationAtDawn.java index bb3ce3b071..280b627dad 100644 --- a/Mage.Sets/src/mage/sets/ravnika/CongregationAtDawn.java +++ b/Mage.Sets/src/mage/sets/ravnika/CongregationAtDawn.java @@ -101,27 +101,29 @@ class CongregationAtDawnEffect extends OneShotEffect { if (target.getTargets().size() > 0) { Cards revealed = new CardsImpl(); for (UUID cardId : (List) target.getTargets()) { - Card card = controller.getLibrary().getCard(cardId, game); + Card card = controller.getLibrary().remove(cardId, game); revealed.add(card); } controller.revealCards(sourceObject.getName(), revealed, game); - controller.shuffleLibrary(game); TargetCard targetToLib = new TargetCard(Zone.PICK, new FilterCard(textTop)); target.setRequired(true); - while (revealed.size() > 1) { - controller.choose(Outcome.Neutral, revealed, target, game); + + while (revealed.size() > 1 && controller.isInGame()) { + controller.choose(Outcome.Neutral, revealed, targetToLib, game); Card card = revealed.get(targetToLib.getFirstTarget(), game); if (card != null) { revealed.remove(card); - card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true); + controller.moveCardToLibraryWithInfo(card, source.getSourceId(), game, Zone.LIBRARY, true, false); + } targetToLib.clearChosen(); } + if (revealed.size() == 1) { Card card = revealed.get(revealed.iterator().next(), game); - card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true); + controller.moveCardToLibraryWithInfo(card, source.getSourceId(), game, Zone.LIBRARY, true, false); } }