32 lines
1.1 KiB
Groovy
32 lines
1.1 KiB
Groovy
[
|
|
new MagicPermanentActivation(
|
|
[MagicCondition.CAN_TAP_CONDITION],
|
|
new MagicActivationHints(MagicTiming.Removal),
|
|
"Damage"
|
|
) {
|
|
@Override
|
|
public MagicEvent[] getCostEvent(final MagicPermanent source) {
|
|
return [new MagicTapEvent(source)];
|
|
}
|
|
@Override
|
|
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
|
|
return new MagicEvent(
|
|
source,
|
|
this,
|
|
"SN deals 1 damage to each creature with flying."
|
|
);
|
|
}
|
|
|
|
@Override
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
|
final MagicPermanent permanent=event.getPermanent();
|
|
final Collection<MagicPermanent> targets=
|
|
game.filterPermanents(permanent.getController(),MagicTargetFilter.TARGET_CREATURE_WITH_FLYING);
|
|
for (final MagicPermanent target : targets) {
|
|
final MagicDamage damage=new MagicDamage(permanent,target,1);
|
|
game.doAction(new MagicDealDamageAction(damage));
|
|
}
|
|
}
|
|
}
|
|
]
|