From 5470a9ee1a84060fc6e900e68ef973b5d5f5491f Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Thu, 17 Sep 2015 08:21:08 +0200 Subject: [PATCH] Added logging statement. --- Mage/src/mage/players/PlayerImpl.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Mage/src/mage/players/PlayerImpl.java b/Mage/src/mage/players/PlayerImpl.java index d5bf156025..6a6f5efd5e 100644 --- a/Mage/src/mage/players/PlayerImpl.java +++ b/Mage/src/mage/players/PlayerImpl.java @@ -3183,7 +3183,13 @@ public abstract class PlayerImpl implements Player, Serializable { if (card.moveToExile(exileId, exileName, sourceId, game)) { if (!game.isSimulation()) { if (card instanceof PermanentCard) { - card = game.getCard(card.getId()); + // in case it's face down or name was changed by copying from other permanent + Card basicCard = game.getCard(card.getId()); + if (basicCard != null) { + card = basicCard; + } else { + logger.error("Couldn't get the card object for the PermanenCard named " + card.getName()); + } } game.informPlayers(this.getLogName() + " moves " + (withName ? card.getLogName() : "a card face down") + " " + (fromZone != null ? "from " + fromZone.toString().toLowerCase(Locale.ENGLISH) + " " : "") + "to the exile zone");