magarena/release/Magarena/scripts/Blaze.groovy

25 lines
976 B
Groovy
Raw Normal View History

2013-05-18 18:26:09 -07:00
[
new MagicSpellCardEvent() {
@Override
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
final int amount=payedCost.getX();
return new MagicEvent(
cardOnStack,
MagicTargetChoice.NEG_TARGET_CREATURE_OR_PLAYER,
new MagicDamageTargetPicker(amount),
this,
"SN deals "+amount+" damage to target creature or player\$."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTarget(game,new MagicTargetAction() {
public void doAction(final MagicTarget target) {
final MagicDamage damage=new MagicDamage(event.getSource(),target,event.getCardOnStack().getX());
game.doAction(new MagicDealDamageAction(damage));
}
});
}
}
]