From b10c01f517090ecde750cb921c3243bd8bdfa208 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Mon, 5 Oct 2015 14:40:33 +0200 Subject: [PATCH] Some minor fixes to player class. --- Mage/src/mage/players/PlayerImpl.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Mage/src/mage/players/PlayerImpl.java b/Mage/src/mage/players/PlayerImpl.java index 3ce3070c96..c905d5a541 100644 --- a/Mage/src/mage/players/PlayerImpl.java +++ b/Mage/src/mage/players/PlayerImpl.java @@ -875,16 +875,15 @@ public abstract class PlayerImpl implements Player, Serializable { */ @Override public boolean putCardsOnTopOfLibrary(Cards cardsToLibrary, Game game, Ability source, boolean anyOrder) { - Cards cards = new CardsImpl(cardsToLibrary); // prevent possible ConcurrentModificationException - cards.addAll(cardsToLibrary); - if (!cards.isEmpty()) { + if (!cardsToLibrary.isEmpty()) { + Cards cards = new CardsImpl(cardsToLibrary); // prevent possible ConcurrentModificationException UUID sourceId = (source == null ? null : source.getSourceId()); if (!anyOrder) { for (UUID cardId : cards) { moveObjectToLibrary(cardId, sourceId, game, true, false); } } else { - TargetCard target = new TargetCard(Zone.PICK, new FilterCard("card to put on the top of your library (last one chosen will be topmost)")); + TargetCard target = new TargetCard(Zone.LIBRARY, new FilterCard("card to put on the top of your library (last one chosen will be topmost)")); target.setRequired(true); while (isInGame() && cards.size() > 1) { this.choose(Outcome.Neutral, cards, target, game);