magarena/release/Magarena/scripts/Swans_of_Bryn_Argoll.groovy

26 lines
856 B
Groovy

[
new MagicIfDamageWouldBeDealtTrigger(MagicTrigger.PREVENT_DAMAGE) {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicDamage damage) {
if (damage.getTarget() == permanent) {
final amt = damage.prevent();
return new MagicEvent(
permanent,
damage.getSource().getController(),
amt,
this,
"PN draws RN cards."
);
}
return MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new MagicDrawAction(
event.getPlayer(),
event.getRefInt()
));
}
}
]