magarena/release/Magarena/scripts/Essence_Sliver.groovy

24 lines
827 B
Groovy

[
new MagicWhenDamageIsDealtTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicDamage damage) {
final int amount=damage.getDealtAmount();
final MagicSource source=damage.getSource();
return source.hasSubType(MagicSubType.Sliver) ?
new MagicEvent(
permanent,
source.getController(),
amount,
this,
"PN gains RN life."
):
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new MagicChangeLifeAction(event.getPlayer(),event.getRefInt()));
}
}
]