magarena/release/Magarena/scripts/Ghostway.groovy

22 lines
843 B
Groovy
Raw Normal View History

2013-04-01 06:52:43 -07:00
[
new MagicSpellCardEvent() {
@Override
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
return new MagicEvent(
cardOnStack,
this,
2013-06-23 18:29:26 -07:00
"Exile each creature you control. " +
2013-04-01 06:52:43 -07:00
"Return those cards to the battlefield under their owners' control at end of turn."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
2013-04-01 06:52:43 -07:00
final Collection<MagicPermanent> targets=
game.filterPermanents(event.getPlayer(),MagicTargetFilter.TARGET_CREATURE_YOU_CONTROL);
for (final MagicPermanent target : targets) {
game.doAction(new MagicExileUntilEndOfTurnAction(target));
}
}
}
]