27 lines
805 B
Groovy
27 lines
805 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 at random."
|
|
):
|
|
MagicEvent.NONE;
|
|
}
|
|
@Override
|
|
public void executeEvent(
|
|
final MagicGame game,
|
|
final MagicEvent event) {
|
|
game.addEvent(new MagicDiscardEvent(
|
|
event.getSource(),
|
|
event.getPlayer(),
|
|
1,
|
|
true
|
|
));
|
|
}
|
|
}
|
|
]
|