magarena/release/Magarena/scripts/Righteous_Blow.groovy

28 lines
1.0 KiB
Groovy

[
new MagicSpellCardEvent() {
@Override
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
return new MagicEvent(
cardOnStack,
MagicTargetChoice.NEG_TARGET_ATTACKING_OR_BLOCKING_CREATURE,
new MagicDamageTargetPicker(2),
this,
"SN deals 2 damage to target attacking or blocking creature\$."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetPermanent(game,new MagicPermanentAction() {
public void doAction(final MagicPermanent creature) {
final MagicDamage damage = new MagicDamage(
event.getSource(),
creature,
2
);
game.doAction(new MagicDealDamageAction(damage));
}
});
}
}
]