magarena/release/Magarena/scripts/Thundermaw_Hellkite.groovy

26 lines
1.1 KiB
Groovy

[
new MagicWhenComesIntoPlayTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent, final MagicPayedCost payedCost) {
return new MagicEvent(
permanent,
this,
"SN deals 1 damage to each creature with flying your opponents control. Tap those creatures."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
final MagicSource permanent = event.getPermanent();
final Collection<MagicPermanent> creatures = game.filterPermanents(
event.getPlayer(),
MagicTargetFilter.TARGET_CREATURE_YOUR_OPPONENT_CONTROLS
);
for (final MagicPermanent creature : creatures) {
final MagicDamage damage=new MagicDamage(permanent,creature,1);
game.doAction(new MagicDealDamageAction(damage));
game.doAction(new MagicTapAction(creature, true));
}
}
}
]