mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
* Otherworldly Journey - Fixed that the exiled card came back wrongly for the controller of Otherworldly Journey instead of the owner of the card.
This commit is contained in:
parent
6a0988ef66
commit
04c3e33c3f
1 changed files with 6 additions and 9 deletions
|
@ -38,7 +38,6 @@ import mage.abilities.DelayedTriggeredAbility;
|
|||
import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.Duration;
|
||||
|
@ -52,7 +51,6 @@ import mage.game.events.GameEvent.EventType;
|
|||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
/**
|
||||
* @author LevelX
|
||||
|
@ -146,16 +144,15 @@ class OtherworldlyJourneyReturnFromExileEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
Card card = game.getCard(objectToReturn.getSourceId());
|
||||
if (card != null && objectToReturn.refersTo(card, game)) {
|
||||
Card card = game.getCard(objectToReturn.getSourceId());
|
||||
if (card != null && objectToReturn.refersTo(card, game)) {
|
||||
Player owner = game.getPlayer(card.getOwnerId());
|
||||
if (owner != null) {
|
||||
game.addEffect(new OtherworldlyJourneyEntersBattlefieldEffect(objectToReturn), source);
|
||||
controller.putOntoBattlefieldWithInfo(card, game, Zone.EXILED, source.getSourceId());
|
||||
owner.putOntoBattlefieldWithInfo(card, game, Zone.EXILED, source.getSourceId());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue