diff --git a/Mage.Sets/src/mage/sets/odyssey/TaintedPact.java b/Mage.Sets/src/mage/sets/odyssey/TaintedPact.java index ad9c5ffb9ac..c2d052c2401 100644 --- a/Mage.Sets/src/mage/sets/odyssey/TaintedPact.java +++ b/Mage.Sets/src/mage/sets/odyssey/TaintedPact.java @@ -87,27 +87,27 @@ class TaintedPactEffect extends OneShotEffect{ public boolean apply(Game game, Ability source) { Card sourceCard = game.getCard(source.getSourceId()); Player player = game.getPlayer(source.getControllerId()); - if (player == null || sourceCard == null) { - return false; - } - Set names = new HashSet(); - while (player.getLibrary().size() > 0) { - Card card = player.getLibrary().getFromTop(game); - if (card != null) { + if (player == null || sourceCard == null) { + return false; + } + Set names = new HashSet(); + while (player.getLibrary().size() > 0) { + Card card = player.getLibrary().getFromTop(game); + if (card != null) { - card.moveToExile(null, null, source.getSourceId(), game); - // Checks if there was already exiled a card with the same name - if (names.contains(card.getName())) { - break; - } - names.add(card.getName()); - if (player.chooseUse(outcome, new StringBuilder("Put ").append(card.getName()).append("into your hand?").toString(), game)) { - //Adds the current card to hand if it is chosen. - card.moveToZone(Zone.HAND, source.getSourceId(), game, true); - break; - } - } + card.moveToExile(null, null, source.getSourceId(), game); + // Checks if there was already exiled a card with the same name + if (names.contains(card.getName())) { + break; + } + names.add(card.getName()); + if (player.chooseUse(outcome, new StringBuilder("Put ").append(card.getName()).append("into your hand?").toString(), game)) { + //Adds the current card to hand if it is chosen. + card.moveToZone(Zone.HAND, source.getSourceId(), game, true); + break; + } } - return true; + } + return true; } }