magarena/release/Magarena/scripts/Hellrider.groovy

25 lines
819 B
Groovy
Raw Normal View History

2013-05-17 21:08:18 -07:00
[
new MagicWhenAttacksTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game, final MagicPermanent permanent, final MagicPermanent creature) {
return permanent.isFriend(creature) ?
new MagicEvent(
permanent,
permanent.getOpponent(),
this,
"SN deals 1 damage to PN."
) :
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
final MagicDamage damage = new MagicDamage(
event.getPermanent(),
event.getPlayer(),
1
);
game.doAction(new MagicDealDamageAction(damage));
}
}
]