* Fixed that tokens removed with Condemn did not get life to target creature controller (related to #742).

This commit is contained in:
LevelX2 2015-03-07 01:12:18 +01:00
parent 57ba2861bc
commit 2e8eeff49f

View file

@ -832,18 +832,13 @@ public abstract class PlayerImpl implements Player, Serializable {
target.setRequired(true); target.setRequired(true);
while (isInGame() && cards.size() > 1) { while (isInGame() && cards.size() > 1) {
this.choose(Outcome.Neutral, cards, target, game); this.choose(Outcome.Neutral, cards, target, game);
Card chosenCard = cards.get(target.getFirstTarget(), game); UUID targetObjectId = target.getFirstTarget();
if (chosenCard != null) { cards.remove(targetObjectId);
cards.remove(chosenCard); moveObjectToLibrary(targetObjectId, source.getSourceId(), game, false, false);
moveObjectToLibrary(chosenCard.getId(), source.getSourceId(), game, false, false);
}
target.clearChosen(); target.clearChosen();
} }
if (cards.size() == 1) { if (cards.size() == 1) {
Card chosenCard = cards.get(cards.iterator().next(), game); moveObjectToLibrary(cards.iterator().next(), source.getSourceId(), game, false, false);
if (chosenCard != null) {
moveObjectToLibrary(chosenCard.getId(), source.getSourceId(), game, false, false);
}
} }
} }
} }
@ -871,11 +866,9 @@ public abstract class PlayerImpl implements Player, Serializable {
target.setRequired(true); target.setRequired(true);
while (isInGame() && cards.size() > 1) { while (isInGame() && cards.size() > 1) {
this.choose(Outcome.Neutral, cards, target, game); this.choose(Outcome.Neutral, cards, target, game);
Card chosenCard = cards.get(target.getFirstTarget(), game); UUID targetObjectId = target.getFirstTarget();
if (chosenCard != null) { cards.remove(targetObjectId);
cards.remove(chosenCard); moveObjectToLibrary(targetObjectId, source.getSourceId(), game, true, false);
moveObjectToLibrary(chosenCard.getId(), source.getSourceId(), game, true, false);
}
target.clearChosen(); target.clearChosen();
} }
if (cards.size() == 1) { if (cards.size() == 1) {