mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 19:41:59 -08:00
- Fixed #6326
This commit is contained in:
parent
5decfa3964
commit
c84a913858
1 changed files with 6 additions and 2 deletions
|
|
@ -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, "");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue