23 lines
941 B
Groovy
23 lines
941 B
Groovy
[
|
|
new MagicSpellCardEvent() {
|
|
@Override
|
|
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
|
|
return new MagicEvent(
|
|
cardOnStack,
|
|
this,
|
|
"SN deals X damage to each creature, where X is the number of creatures on the battlefield."
|
|
);
|
|
}
|
|
@Override
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
|
final int amount=game.getNrOfPermanents(MagicType.Creature);
|
|
final Collection<MagicPermanent> targets=
|
|
game.filterPermanents(event.getPlayer(),MagicTargetFilter.TARGET_CREATURE);
|
|
for (final MagicPermanent target : targets) {
|
|
final MagicDamage damage=new MagicDamage(event.getSource(),target,amount);
|
|
game.doAction(new MagicDealDamageAction(damage));
|
|
}
|
|
}
|
|
}
|
|
]
|