2013-04-12 19:58:51 -07:00
|
|
|
[
|
2013-05-03 18:27:25 -07:00
|
|
|
new MagicWhenDamageIsDealtTrigger() {
|
|
|
|
@Override
|
|
|
|
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicDamage damage) {
|
|
|
|
final int amount=damage.getDealtAmount();
|
|
|
|
return (damage.getSource()==permanent.getEnchantedCreature()) ?
|
|
|
|
new MagicEvent(
|
|
|
|
permanent,
|
|
|
|
amount,
|
|
|
|
this,
|
|
|
|
"PN gains " + amount + " life.")
|
|
|
|
:
|
|
|
|
MagicEvent.NONE;
|
|
|
|
}
|
|
|
|
@Override
|
|
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
|
|
|
game.doAction(new MagicChangeLifeAction(event.getPlayer(),event.getRefInt()));
|
|
|
|
}
|
|
|
|
}
|
2013-04-12 19:58:51 -07:00
|
|
|
]
|