From 51ad95ffd2f0c52ea7cf62fe649278bc11d3c264 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Tue, 14 Jul 2015 09:31:11 +0200 Subject: [PATCH] * Fixed that the transform planeswalker did not return from exile under owners control but under previous controller's control. --- .../ExileAndReturnTransformedSourceEffect.java | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/Mage/src/mage/abilities/effects/common/ExileAndReturnTransformedSourceEffect.java b/Mage/src/mage/abilities/effects/common/ExileAndReturnTransformedSourceEffect.java index 6b57e657d3c..6fe7a0a697c 100644 --- a/Mage/src/mage/abilities/effects/common/ExileAndReturnTransformedSourceEffect.java +++ b/Mage/src/mage/abilities/effects/common/ExileAndReturnTransformedSourceEffect.java @@ -63,13 +63,16 @@ public class ExileAndReturnTransformedSourceEffect extends OneShotEffect { if (sourceObject != null && controller != null) { Card card = (Card) sourceObject; if (controller.moveCards(card, Zone.BATTLEFIELD, Zone.EXILED, source, game)) { - game.getState().setValue(TransformAbility.VALUE_KEY_ENTER_TRANSFORMED + source.getSourceId(), Boolean.TRUE); - controller.putOntoBattlefieldWithInfo(card, game, Zone.EXILED, source.getSourceId()); - if (additionalEffect != null) { - if (additionalEffect instanceof ContinuousEffect) { - game.addEffect((ContinuousEffect) additionalEffect, source); - } else { - additionalEffect.apply(game, source); + Player owner = game.getPlayer(card.getOwnerId()); + if (owner != null) { + game.getState().setValue(TransformAbility.VALUE_KEY_ENTER_TRANSFORMED + source.getSourceId(), Boolean.TRUE); + owner.putOntoBattlefieldWithInfo(card, game, Zone.EXILED, source.getSourceId()); + if (additionalEffect != null) { + if (additionalEffect instanceof ContinuousEffect) { + game.addEffect((ContinuousEffect) additionalEffect, source); + } else { + additionalEffect.apply(game, source); + } } } }