magarena/release/Magarena/scripts/Raking_Canopy.groovy

22 lines
807 B
Groovy
Raw Normal View History

2013-03-31 22:39:18 -07:00
[
new MagicWhenAttacksTrigger() {
2012-06-17 05:19:08 -07:00
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent creature) {
return (creature.getController()!=permanent.getController()&&creature.hasAbility(MagicAbility.Flying)) ?
2011-08-13 06:37:22 -07:00
new MagicEvent(
2013-03-31 22:39:18 -07:00
permanent,
creature,
this,
2013-06-15 06:13:32 -07:00
"SN deals 4 damage to RN."
2013-03-31 22:39:18 -07:00
) :
2011-09-04 01:19:43 -07:00
MagicEvent.NONE;
2012-06-17 05:19:08 -07:00
}
2013-06-23 18:29:26 -07:00
2012-06-17 05:19:08 -07:00
@Override
2013-06-15 06:13:32 -07:00
public void executeEvent(final MagicGame game, final MagicEvent event) {
final MagicDamage damage=new MagicDamage(event.getSource(),event.getRefPermanent(),4);
2012-06-17 05:19:08 -07:00
game.doAction(new MagicDealDamageAction(damage));
}
2013-03-31 22:39:18 -07:00
}
]