magarena/release/Magarena/scripts/Caltrops.groovy

19 lines
640 B
Groovy

[
new MagicWhenAttacksTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent creature) {
return new MagicEvent(
permanent,
creature,
this,
"SN deals 1 damage to RN."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
final MagicDamage damage = new MagicDamage(event.getSource(),event.getRefPermanent(),1);
game.doAction(new MagicDealDamageAction(damage));
}
}
]