magarena/release/Magarena/scripts/Ghostway.groovy

24 lines
877 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,
"Exile each creature you control. " +
"Return those cards to the battlefield under their owners' control at end of turn."
);
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
final Collection<MagicPermanent> targets=
game.filterPermanents(event.getPlayer(),MagicTargetFilter.TARGET_CREATURE_YOU_CONTROL);
for (final MagicPermanent target : targets) {
game.doAction(new MagicExileUntilEndOfTurnAction(target));
}
}
}
]