magarena/release/Magarena/scripts/Exquisite_Blood.groovy

29 lines
880 B
Groovy
Raw Normal View History

2013-04-12 19:58:51 -07:00
[
new MagicWhenLifeIsLostTrigger() {
@Override
public MagicEvent executeTrigger(
final MagicGame game,
final MagicPermanent permanent,
final MagicLifeChangeTriggerData lifeChange) {
final int amount = lifeChange.amount;
return permanent.isOpponent(lifeChange.player) ?
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()
));
}
}
]