magarena/release/Magarena/scripts/Alley_Grifters.groovy

23 lines
724 B
Groovy

[
new MagicWhenBecomesBlockedTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent blocked) {
return (permanent == blocked) ?
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()
));
}
}
]