magarena/release/Magarena/scripts/Kami_of_the_Honored_Dead.gr...

26 lines
839 B
Groovy
Raw Normal View History

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) {
final int amount = damage.getDealtAmount();
2012-06-17 05:19:08 -07:00
return (damage.getTarget() == permanent) ?
new MagicEvent(
2012-09-21 20:34:08 -07:00
permanent,
amount,
2012-09-21 20:34:08 -07:00
this,
"PN gains " + amount + " life."
) :
MagicEvent.NONE;
2012-06-17 05:19:08 -07:00
}
@Override
public void executeEvent(
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
}
]