From 35654a5ca8520930bb58ad4837e2099a0f9cdbf0 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sun, 14 Jun 2015 18:39:01 +0200 Subject: [PATCH] Fixed that by some effects that move permanents from battlefield to other zones, the object was not moved and was still on the battlefield but also shown in the target zone. --- Mage/src/mage/players/PlayerImpl.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Mage/src/mage/players/PlayerImpl.java b/Mage/src/mage/players/PlayerImpl.java index d008337270..732fe47137 100644 --- a/Mage/src/mage/players/PlayerImpl.java +++ b/Mage/src/mage/players/PlayerImpl.java @@ -2839,7 +2839,19 @@ public abstract class PlayerImpl implements Player, Serializable { @Override public boolean moveCards(Cards cards, Zone fromZone, Zone toZone, Ability source, Game game) { ArrayList cardList = new ArrayList<>(); - cardList.addAll(cards.getCards(game)); + for (UUID cardId: cards) { + if (fromZone.equals(Zone.BATTLEFIELD)) { + Permanent permanent = game.getPermanent(cardId); + if (permanent != null) { + cardList.add(permanent); + } + } else { + Card card = game.getCard(cardId); + if (card != null) { + cardList.add(card); + } + } + } return moveCards(cardList, fromZone, toZone, source, game); }