magarena/release/Magarena/scripts/Drelnoch.groovy

29 lines
920 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,
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));
}
}
}
]