24 lines
941 B
Groovy
24 lines
941 B
Groovy
|
[
|
||
|
new MagicWhenComesIntoPlayTrigger() {
|
||
|
@Override
|
||
|
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent, final MagicPlayer player) {
|
||
|
return new MagicEvent(
|
||
|
permanent,
|
||
|
player,
|
||
|
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));
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
]
|