magarena/release/Magarena/scripts/Mikaeus__the_Unhallowed.groovy

26 lines
848 B
Groovy

[
new MagicWhenDamageIsDealtTrigger() {
@Override
public MagicEvent executeTrigger(
final MagicGame game,
final MagicPermanent permanent,
final MagicDamage damage) {
return (permanent.isController(damage.getTarget()) &&
damage.getSource().isPermanent() &&
damage.getSource().hasSubType(MagicSubType.Human)) ?
new MagicEvent(
permanent,
damage.getSource(),
this,
"Destroy RN."
):
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new MagicDestroyAction(event.getRefPermanent()));
}
}
]