From 2e8eeff49f05a09673edf64e1c3fe0f3eb93bcc5 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sat, 7 Mar 2015 01:12:18 +0100 Subject: [PATCH] * Fixed that tokens removed with Condemn did not get life to target creature controller (related to #742). --- Mage/src/mage/players/PlayerImpl.java | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/Mage/src/mage/players/PlayerImpl.java b/Mage/src/mage/players/PlayerImpl.java index c860ded14d..c311b8d567 100644 --- a/Mage/src/mage/players/PlayerImpl.java +++ b/Mage/src/mage/players/PlayerImpl.java @@ -832,18 +832,13 @@ public abstract class PlayerImpl implements Player, Serializable { target.setRequired(true); while (isInGame() && cards.size() > 1) { this.choose(Outcome.Neutral, cards, target, game); - Card chosenCard = cards.get(target.getFirstTarget(), game); - if (chosenCard != null) { - cards.remove(chosenCard); - moveObjectToLibrary(chosenCard.getId(), source.getSourceId(), game, false, false); - } + UUID targetObjectId = target.getFirstTarget(); + cards.remove(targetObjectId); + moveObjectToLibrary(targetObjectId, source.getSourceId(), game, false, false); target.clearChosen(); } if (cards.size() == 1) { - Card chosenCard = cards.get(cards.iterator().next(), game); - if (chosenCard != null) { - moveObjectToLibrary(chosenCard.getId(), source.getSourceId(), game, false, false); - } + moveObjectToLibrary(cards.iterator().next(), source.getSourceId(), game, false, false); } } } @@ -871,11 +866,9 @@ public abstract class PlayerImpl implements Player, Serializable { target.setRequired(true); while (isInGame() && cards.size() > 1) { this.choose(Outcome.Neutral, cards, target, game); - Card chosenCard = cards.get(target.getFirstTarget(), game); - if (chosenCard != null) { - cards.remove(chosenCard); - moveObjectToLibrary(chosenCard.getId(), source.getSourceId(), game, true, false); - } + UUID targetObjectId = target.getFirstTarget(); + cards.remove(targetObjectId); + moveObjectToLibrary(targetObjectId, source.getSourceId(), game, true, false); target.clearChosen(); } if (cards.size() == 1) {