magarena/release/Magarena/scripts/Thunder_Dragon.groovy

23 lines
923 B
Groovy

[
new MagicWhenComesIntoPlayTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent, final MagicPayedCost payedCost) {
return new MagicEvent(
permanent,
this,
"SN deals 3 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,3);
game.doAction(new MagicDealDamageAction(damage));
}
}
}
]