magarena/release/Magarena/scripts/Abyssal_Nightstalker.groovy

27 lines
829 B
Groovy

[
new MagicWhenAttacksUnblockedTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent creature) {
return (creature == permanent) ?
new MagicEvent(
permanent,
permanent.getOpponent(),
this,
"PN discards a card."
):
MagicEvent.NONE;
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
game.addEvent(new MagicDiscardEvent(
event.getPermanent(),
event.getPlayer(),
1,
false
));
}
}
]