25 lines
976 B
Groovy
25 lines
976 B
Groovy
[
|
|
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));
|
|
}
|
|
});
|
|
}
|
|
}
|
|
]
|