Reworked some trap cards using old AlternateCosts class.

This commit is contained in:
LevelX2 2016-02-27 23:44:59 +01:00
parent f87c5bbbec
commit 0f1839af56
38 changed files with 547 additions and 820 deletions

View file

@ -38,6 +38,8 @@ import mage.constants.Outcome;
import mage.constants.Zone;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.game.stack.Spell;
import mage.game.stack.StackObject;
import mage.players.Player;
import mage.target.Target;
import mage.target.targetpointer.FirstTargetPointer;
@ -133,6 +135,11 @@ public class ExileTargetEffect extends OneShotEffect {
if (!currentZone.equals(Zone.EXILED) && (onlyFromZone == null || onlyFromZone.equals(currentZone))) {
toExile.add(card);
}
} else {
StackObject stackObject = game.getStack().getStackObject(targetId);
if (stackObject instanceof Spell && ((Spell) stackObject).getCard() != null) {
toExile.add(((Spell) stackObject).getCard());
}
}
}
}