13 lines
503 B
Groovy
13 lines
503 B
Groovy
[
|
|
new MagicWouldBeMovedTrigger(MagicTrigger.REPLACEMENT) {
|
|
@Override
|
|
public MagicEvent executeTrigger(final MagicGame game, final MagicPermanent permanent, final MagicMoveCardAction act) {
|
|
if ((act.card.hasType(MagicType.Instant) || act.card.hasType(MagicType.Sorcery)) &&
|
|
act.getToLocation() == MagicLocationType.Graveyard) {
|
|
act.setToLocation(MagicLocationType.Exile);
|
|
}
|
|
return MagicEvent.NONE;
|
|
}
|
|
}
|
|
]
|