magarena/release/Magarena/scripts/Earthshaker.groovy

23 lines
928 B
Groovy
Raw Normal View History

2013-07-19 05:33:07 -07:00
[
new MagicWhenYouCastSpiritOrArcaneTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicCardOnStack spell) {
return new MagicEvent(
permanent,
this,
"SN deals 2 damage to each creature without flying."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
final MagicSource source=event.getSource();
final Collection<MagicPermanent> creatures=
game.filterPermanents(event.getPlayer(),MagicTargetFilter.TARGET_CREATURE_WITHOUT_FLYING);
for (final MagicPermanent creature : creatures) {
final MagicDamage damage=new MagicDamage(source,creature,2);
game.doAction(new MagicDealDamageAction(damage));
}
}
}
]