2013-03-18 06:19:29 -07:00
|
|
|
[
|
|
|
|
new MagicWhenDamageIsDealtTrigger() {
|
2012-06-17 05:19:08 -07:00
|
|
|
@Override
|
|
|
|
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicDamage damage) {
|
2011-10-30 05:59:37 -07:00
|
|
|
final int amount = damage.getDealtAmount();
|
2012-06-17 05:19:08 -07:00
|
|
|
return (damage.getTarget() == permanent) ?
|
2011-10-30 05:59:37 -07:00
|
|
|
new MagicEvent(
|
2012-09-21 20:34:08 -07:00
|
|
|
permanent,
|
2012-10-06 20:32:09 -07:00
|
|
|
amount,
|
2012-09-21 20:34:08 -07:00
|
|
|
this,
|
|
|
|
"PN gains " + amount + " life."
|
|
|
|
) :
|
2011-10-30 05:59:37 -07:00
|
|
|
MagicEvent.NONE;
|
2012-06-17 05:19:08 -07:00
|
|
|
}
|
|
|
|
@Override
|
|
|
|
public void executeEvent(
|
2011-10-30 05:59:37 -07:00
|
|
|
final MagicGame game,
|
2013-03-22 22:00:53 -07:00
|
|
|
final MagicEvent event) {
|
2012-06-17 05:19:08 -07:00
|
|
|
game.doAction(new MagicChangeLifeAction(
|
2013-03-18 06:19:29 -07:00
|
|
|
event.getPlayer(),
|
|
|
|
event.getRefInt()
|
|
|
|
));
|
2012-06-17 05:19:08 -07:00
|
|
|
}
|
2013-03-18 06:19:29 -07:00
|
|
|
}
|
|
|
|
]
|