* Fixed that the transform planeswalker did not return from exile under owners control but under previous controller's control.

This commit is contained in:
LevelX2 2015-07-14 09:31:11 +02:00
parent cd3a37ac6c
commit 51ad95ffd2

View file

@ -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);
}
}
}
}