29 lines
920 B
Groovy
29 lines
920 B
Groovy
[
|
|
new MagicWhenBecomesBlockedTrigger() {
|
|
@Override
|
|
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent blocked) {
|
|
return (permanent == blocked) ?
|
|
new MagicEvent(
|
|
permanent,
|
|
new MagicSimpleMayChoice(
|
|
MagicSimpleMayChoice.DRAW_CARDS,
|
|
2,
|
|
MagicSimpleMayChoice.DEFAULT_NONE
|
|
),
|
|
this,
|
|
"PN may\$ draw two cards."
|
|
):
|
|
MagicEvent.NONE;
|
|
}
|
|
|
|
@Override
|
|
public void executeEvent(
|
|
final MagicGame game,
|
|
final MagicEvent event) {
|
|
if (event.isYes()) {
|
|
game.doAction(new MagicDrawAction(event.getPlayer(),2));
|
|
}
|
|
}
|
|
}
|
|
]
|