diff --git a/Mage/src/mage/abilities/common/OpponentSacrificesNonTokenPermanentTriggeredAbility.java b/Mage/src/mage/abilities/common/OpponentSacrificesNonTokenPermanentTriggeredAbility.java index 71d6972442..26d13ed96b 100644 --- a/Mage/src/mage/abilities/common/OpponentSacrificesNonTokenPermanentTriggeredAbility.java +++ b/Mage/src/mage/abilities/common/OpponentSacrificesNonTokenPermanentTriggeredAbility.java @@ -27,15 +27,14 @@ */ package mage.abilities.common; -import mage.MageObject; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.effects.Effect; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.permanent.Permanent; -import mage.target.targetpointer.FixedTarget; import mage.game.permanent.PermanentToken; +import mage.target.targetpointer.FixedTarget; public class OpponentSacrificesNonTokenPermanentTriggeredAbility extends TriggeredAbilityImpl { @@ -54,9 +53,9 @@ public class OpponentSacrificesNonTokenPermanentTriggeredAbility extends Trigger @Override public boolean checkTrigger(GameEvent event, Game game) { - if (game.getPlayer(this.getControllerId()).hasOpponent(event.getPlayerId(), game)) { - MageObject object = game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD); - if (object instanceof Permanent && !(object instanceof PermanentToken) ) { + if (game.getPlayer(getControllerId()).hasOpponent(event.getPlayerId(), game)) { + Permanent permanent = (Permanent) game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD); + if (permanent != null && !(permanent instanceof PermanentToken) ) { for (Effect effect : getEffects()) { effect.setTargetPointer(new FixedTarget(event.getTargetId())); } diff --git a/Mage/src/mage/game/permanent/PermanentCard.java b/Mage/src/mage/game/permanent/PermanentCard.java index ecde8334a3..c4d58105d3 100644 --- a/Mage/src/mage/game/permanent/PermanentCard.java +++ b/Mage/src/mage/game/permanent/PermanentCard.java @@ -146,7 +146,6 @@ public class PermanentCard extends PermanentImpl { Player owner = game.getPlayer(ownerId); game.rememberLKI(objectId, Zone.BATTLEFIELD, this); if (owner != null) { - this.setControllerId(ownerId); // neccessary for e.g. abilities in graveyard or hand to not have a controller != owner if (originalCard != null) { originalCard.updateZoneChangeCounter(); }