magarena/release/Magarena/scripts/Corrupt_Official.groovy

27 lines
805 B
Groovy
Raw Normal View History

2013-04-12 19:58:51 -07:00
[
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 at random."
):
MagicEvent.NONE;
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
game.addEvent(new MagicDiscardEvent(
event.getSource(),
event.getPlayer(),
1,
true
));
}
}
]