2013-05-17 23:14:43 -07:00
|
|
|
[
|
|
|
|
new MagicWhenDamageIsDealtTrigger() {
|
2012-06-17 05:19:08 -07:00
|
|
|
@Override
|
|
|
|
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicDamage damage) {
|
2012-09-21 09:10:24 -07:00
|
|
|
final MagicPermanent enchanted = permanent.getEnchantedCreature();
|
|
|
|
return (enchanted == damage.getSource() &&
|
|
|
|
enchanted.isOpponent(damage.getTarget())) ?
|
2012-06-17 05:19:08 -07:00
|
|
|
new MagicEvent(
|
2012-09-21 09:10:24 -07:00
|
|
|
enchanted,
|
2011-08-12 01:47:57 -07:00
|
|
|
new MagicSimpleMayChoice(
|
2011-09-14 05:14:49 -07:00
|
|
|
MagicSimpleMayChoice.DRAW_CARDS,
|
|
|
|
1,
|
2013-05-17 23:14:43 -07:00
|
|
|
MagicSimpleMayChoice.DEFAULT_NONE
|
|
|
|
),
|
2011-08-12 01:47:57 -07:00
|
|
|
this,
|
2013-06-15 07:27:32 -07:00
|
|
|
"PN may\$ draw a card."
|
|
|
|
) :
|
2011-09-04 01:19:43 -07:00
|
|
|
MagicEvent.NONE;
|
2012-06-17 05:19:08 -07:00
|
|
|
}
|
|
|
|
@Override
|
2013-05-17 23:14:43 -07:00
|
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
2013-03-22 19:26:50 -07:00
|
|
|
if (event.isYes()) {
|
2013-06-21 20:55:22 -07:00
|
|
|
game.doAction(new MagicDrawAction(event.getPlayer()));
|
2012-06-17 05:19:08 -07:00
|
|
|
}
|
|
|
|
}
|
2013-05-17 23:14:43 -07:00
|
|
|
}
|
|
|
|
]
|