mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
Fix return to battlefield effect losing target if it has changed zones
for a fixed target pointer.
This commit is contained in:
parent
c5c51cacf0
commit
ddc2128f78
1 changed files with 8 additions and 1 deletions
|
@ -29,6 +29,7 @@
|
|||
package mage.abilities.effects.common;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.abilities.Ability;
|
||||
|
@ -37,6 +38,7 @@ import mage.cards.Card;
|
|||
import mage.game.ExileZone;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
/**
|
||||
|
@ -85,7 +87,12 @@ public class ReturnToBattlefieldUnderYourControlTargetEffect extends OneShotEffe
|
|||
}
|
||||
}
|
||||
} else {
|
||||
card = game.getCard(targetPointer.getFirst(game, source));
|
||||
if(targetPointer instanceof FixedTarget) {
|
||||
card = game.getCard(((FixedTarget) targetPointer).getTarget());
|
||||
} else {
|
||||
card = game.getCard(targetPointer.getFirst(game, source));
|
||||
}
|
||||
|
||||
}
|
||||
if (card != null) {
|
||||
Zone currentZone = game.getState().getZone(card.getId());
|
||||
|
|
Loading…
Reference in a new issue