magarena/release/Magarena/scripts/Sudden_Disappearance.groovy

28 lines
1.1 KiB
Groovy
Raw Normal View History

2013-05-19 01:17:35 -07:00
[
new MagicSpellCardEvent() {
@Override
2013-06-15 18:11:36 -07:00
public MagicEvent getEvent(final MagicCardOnStack cardOnStack, final MagicPayedCost payedCost) {
2013-05-19 01:17:35 -07:00
return new MagicEvent(
cardOnStack,
MagicTargetChoice.TARGET_PLAYER,
this,
"Exile all nonland permanents target player\$ controls."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetPlayer(game,new MagicPlayerAction() {
public void doAction(final MagicPlayer player) {
final Collection<MagicPermanent> targets =
game.filterPermanents(player,MagicTargetFilter.TARGET_PERMANENT_YOU_CONTROL);
for (final MagicPermanent permanent : targets) {
if (!permanent.isLand()) {
2013-06-23 18:29:26 -07:00
game.doAction(new MagicExileUntilEndOfTurnAction(permanent));
2013-05-19 01:17:35 -07:00
}
}
}
});
}
}
]