From c15719b36b476a1252dc8a42d5625bae940a0e31 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Mon, 20 Jun 2016 16:21:52 +0200 Subject: [PATCH] Fixed the transform message shown in the game log. --- .../effects/common/TransformSourceEffect.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Mage/src/main/java/mage/abilities/effects/common/TransformSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/TransformSourceEffect.java index a2efe87617..9ac6c1405f 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/TransformSourceEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/TransformSourceEffect.java @@ -32,7 +32,7 @@ import mage.abilities.effects.OneShotEffect; import mage.constants.Outcome; import mage.game.Game; import mage.game.permanent.Permanent; -import mage.game.permanent.PermanentToken; +import mage.game.permanent.PermanentCard; import org.apache.log4j.Logger; /** @@ -87,12 +87,12 @@ public class TransformSourceEffect extends OneShotEffect { if (!game.isSimulation()) { if (fromDayToNight) { if (permanent.getSecondCardFace() != null) { - game.informPlayers(permanent.getIdName() + " transforms into " + permanent.getSecondCardFace().getIdName()); - } else { - logger.error("Can't get SecondCardFace " + permanent.getName() + " Token: " + (permanent instanceof PermanentToken ? "Yes" : "No")); + if (permanent instanceof PermanentCard) { + game.informPlayers(((PermanentCard) permanent).getCard().getLogName() + " transforms into " + permanent.getSecondCardFace().getLogName()); + } } } else { - game.informPlayers(permanent.getSecondCardFace().getIdName() + " transforms into " + permanent.getIdName()); + game.informPlayers(permanent.getSecondCardFace().getLogName() + " transforms into " + permanent.getLogName()); } } }