2013-02-16 17:21:51 -08:00
|
|
|
[
|
|
|
|
new MagicWhenDamageIsDealtTrigger() {
|
|
|
|
@Override
|
|
|
|
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicDamage damage) {
|
|
|
|
final int amount = damage.getDealtAmount();
|
|
|
|
return (damage.getTarget() == permanent) ?
|
|
|
|
new MagicEvent(
|
|
|
|
permanent,
|
|
|
|
MagicTargetChoice.NEG_TARGET_CREATURE_OR_PLAYER,
|
|
|
|
new MagicDamageTargetPicker(amount),
|
|
|
|
amount,
|
|
|
|
this,
|
|
|
|
"SN deals " + amount + " damage to target creature or player\$."
|
|
|
|
):
|
|
|
|
MagicEvent.NONE;
|
|
|
|
}
|
|
|
|
@Override
|
|
|
|
public void executeEvent(
|
|
|
|
final MagicGame game,
|
2013-03-22 22:00:53 -07:00
|
|
|
final MagicEvent event) {
|
2013-03-21 06:35:09 -07:00
|
|
|
event.processTarget(game,new MagicTargetAction() {
|
2013-02-16 17:21:51 -08:00
|
|
|
public void doAction(final MagicTarget target) {
|
2013-03-02 01:46:45 -08:00
|
|
|
final MagicDamage damage=new MagicDamage(event.getSource(),target,event.getRefInt());
|
2013-02-16 17:21:51 -08:00
|
|
|
game.doAction(new MagicDealDamageAction(damage));
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|