2013-05-18 19:51:58 -07:00
|
|
|
[
|
2013-07-09 05:41:40 -07:00
|
|
|
new MagicWhenOtherDiesTrigger() {
|
2013-04-12 19:32:25 -07:00
|
|
|
@Override
|
|
|
|
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent otherPermanent) {
|
|
|
|
return (permanent != otherPermanent && otherPermanent.isCreature()) ?
|
|
|
|
new MagicEvent(
|
|
|
|
permanent,
|
|
|
|
permanent.getController(),
|
|
|
|
new MagicSimpleMayChoice(
|
|
|
|
MagicSimpleMayChoice.DRAW_CARDS,
|
|
|
|
1,
|
|
|
|
MagicSimpleMayChoice.DEFAULT_NONE
|
|
|
|
),
|
|
|
|
this,
|
2013-05-18 19:51:58 -07:00
|
|
|
"You may\$ draw a card. If you do, discard a card."
|
|
|
|
):
|
2013-04-12 19:32:25 -07:00
|
|
|
MagicEvent.NONE;
|
|
|
|
}
|
|
|
|
@Override
|
2013-05-18 19:51:58 -07:00
|
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
2013-04-12 19:32:25 -07:00
|
|
|
if (event.isYes()) {
|
|
|
|
final MagicPlayer player=event.getPlayer();
|
2013-06-21 20:55:22 -07:00
|
|
|
game.doAction(new MagicDrawAction(player));
|
|
|
|
game.addEvent(new MagicDiscardEvent(event.getSource(),player));
|
2013-04-12 19:32:25 -07:00
|
|
|
}
|
|
|
|
}
|
2013-05-18 19:51:58 -07:00
|
|
|
}
|
|
|
|
]
|