magarena/release/Magarena/scripts/Ophidian.groovy

31 lines
1.0 KiB
Groovy
Raw Normal View History

2013-05-18 06:02:47 -07:00
[
new MagicWhenAttacksUnblockedTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent creature) {
return (creature == permanent) ?
new MagicEvent(
permanent,
new MagicSimpleMayChoice(
MagicSimpleMayChoice.DRAW_CARDS,
1,
MagicSimpleMayChoice.DEFAULT_NONE
),
this,
"PN may\$ draw a card."
):
MagicEvent.NONE;
}
2013-06-23 18:29:26 -07:00
2013-05-18 06:02:47 -07:00
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
if (event.isYes()) {
game.doAction(new MagicDrawAction(event.getPlayer()));
game.doAction(MagicChangeStateAction.Set(
2013-05-18 06:02:47 -07:00
event.getPermanent(),
MagicPermanentState.NoCombatDamage
2013-05-18 06:02:47 -07:00
));
}
}
}
]