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()) {
|
2013-06-21 20:55:22 -07:00
|
|
|
game.doAction(new MagicDrawAction(event.getPlayer()));
|
2013-06-21 23:40:39 -07:00
|
|
|
game.doAction(MagicChangeStateAction.Set(
|
2013-05-18 06:02:47 -07:00
|
|
|
event.getPermanent(),
|
2013-06-21 23:40:39 -07:00
|
|
|
MagicPermanentState.NoCombatDamage
|
2013-05-18 06:02:47 -07:00
|
|
|
));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|