2013-05-25 19:23:07 -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,
|
2013-05-25 19:43:47 -07:00
|
|
|
"SN deals " + amount + " damage to target creature or player\$. " +
|
2013-05-25 19:23:07 -07:00
|
|
|
"PN gains " + amount + " life."
|
|
|
|
);
|
|
|
|
}
|
|
|
|
@Override
|
|
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
|
|
|
final int amount = event.getCardOnStack().getX();
|
|
|
|
event.processTarget(game,new MagicTargetAction() {
|
|
|
|
public void doAction(final MagicTarget target) {
|
|
|
|
final MagicDamage damage=new MagicDamage(event.getSource(),target,amount);
|
|
|
|
game.doAction(new MagicDealDamageAction(damage));
|
|
|
|
game.doAction(new MagicChangeLifeAction(event.getPlayer(),amount));
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|