mirror of
https://github.com/correl/mage.git
synced 2025-01-12 11:08:01 +00:00
* Fixed that the transform planeswalker did not return from exile under owners control but under previous controller's control.
This commit is contained in:
parent
cd3a37ac6c
commit
51ad95ffd2
1 changed files with 10 additions and 7 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue