32 lines
1.1 KiB
Groovy
32 lines
1.1 KiB
Groovy
[
|
|
new MagicWhenOtherPutIntoGraveyardFromPlayTrigger() {
|
|
@Override
|
|
public MagicEvent executeTrigger(
|
|
final MagicGame game,
|
|
final MagicPermanent permanent,
|
|
final MagicPermanent otherPermanent) {
|
|
return (permanent != otherPermanent &&
|
|
otherPermanent.isCreature() &&
|
|
otherPermanent.isNonToken()) ?
|
|
new MagicEvent(
|
|
permanent,
|
|
permanent.getController(),
|
|
new MagicSimpleMayChoice(
|
|
MagicSimpleMayChoice.DRAW_CARDS,
|
|
1,
|
|
MagicSimpleMayChoice.DEFAULT_NONE
|
|
),
|
|
this,
|
|
"You may\$ draw a card."
|
|
):
|
|
MagicEvent.NONE;
|
|
}
|
|
@Override
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
|
if (event.isYes()) {
|
|
game.doAction(new MagicDrawAction(event.getPlayer(),1));
|
|
}
|
|
}
|
|
}
|
|
]
|