This commit is contained in:
bubba 2020-07-18 11:01:03 -05:00
parent 5decfa3964
commit c84a913858

View file

@ -8,6 +8,7 @@ package mage.abilities.effects.common;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.Zone;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.players.Player; import mage.players.Player;
@ -35,8 +36,11 @@ public class ExileAttachedEffect extends OneShotEffect {
@Override @Override
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId()); Player controller = game.getPlayer(source.getControllerId());
Permanent enchantment = game.getPermanentOrLKIBattlefield(source.getSourceId()); // The LKI must be used for this step. 608.2g
if (controller != null && enchantment != null && enchantment.getAttachedTo() != null) { Permanent enchantment = (Permanent) game.getLastKnownInformation(source.getSourceId(), Zone.BATTLEFIELD);
if (controller != null
&& enchantment != null
&& enchantment.getAttachedTo() != null) {
Permanent creature = game.getPermanent(enchantment.getAttachedTo()); Permanent creature = game.getPermanent(enchantment.getAttachedTo());
if (creature != null) { if (creature != null) {
controller.moveCardsToExile(creature, source, game, true, null, ""); controller.moveCardsToExile(creature, source, game, true, null, "");