Fixed a bug that let cards disappear after moving cards from hand to library (e.g. Teferi's puzzle).

This commit is contained in:
LevelX2 2016-09-22 21:36:21 +02:00
parent 9805f4f9ef
commit 8fb04ddbef
3 changed files with 28 additions and 22 deletions

View file

@ -863,8 +863,9 @@ public abstract class PlayerImpl implements Player, Serializable {
}
@Override
public boolean putCardsOnBottomOfLibrary(Cards cards, Game game, Ability source, boolean anyOrder) {
if (!cards.isEmpty()) {
public boolean putCardsOnBottomOfLibrary(Cards cardsToLibrary, Game game, Ability source, boolean anyOrder) {
if (!cardsToLibrary.isEmpty()) {
Cards cards = new CardsImpl(cardsToLibrary); // prevent possible ConcurrentModificationException
if (!anyOrder) {
for (UUID objectId : cards) {
moveObjectToLibrary(objectId, source == null ? null : source.getSourceId(), game, false, false);