2013-05-28 00:56:26 -07:00
|
|
|
[
|
|
|
|
new MagicSpellCardEvent() {
|
|
|
|
@Override
|
|
|
|
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
|
|
|
|
final int amount = payedCost.getX();
|
|
|
|
return new MagicEvent(
|
|
|
|
cardOnStack,
|
2013-06-18 08:07:47 -07:00
|
|
|
MagicTargetChoice.NEG_TARGET_CREATURE_OR_PLAYER,
|
2013-05-28 00:56:26 -07:00
|
|
|
new MagicDamageTargetPicker(amount),
|
|
|
|
amount,
|
|
|
|
this,
|
2013-06-23 18:29:26 -07:00
|
|
|
"SN deals RN damage to target creature or player\$. " +
|
2013-06-18 08:07:47 -07:00
|
|
|
"If the buyback cost was payed, return SN to its owner's hand as it resolves."
|
2013-05-28 00:56:26 -07:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
@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.getRefInt()
|
|
|
|
);
|
|
|
|
game.doAction(new MagicDealDamageAction(damage));
|
|
|
|
if (event.isBuyback()) {
|
|
|
|
game.doAction(new MagicChangeCardDestinationAction(event.getCardOnStack(), MagicLocationType.OwnersHand));
|
2013-06-23 18:29:26 -07:00
|
|
|
}
|
2013-05-28 00:56:26 -07:00
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|