29 lines
1010 B
Groovy
29 lines
1010 B
Groovy
|
[
|
||
|
new MagicWhenPutIntoGraveyardTrigger() {
|
||
|
@Override
|
||
|
public MagicEvent executeTrigger(
|
||
|
final MagicGame game,
|
||
|
final MagicPermanent permanent,
|
||
|
final MagicGraveyardTriggerData triggerData) {
|
||
|
return (triggerData.fromLocation == MagicLocationType.Play) ?
|
||
|
new MagicEvent(
|
||
|
permanent,
|
||
|
MagicTargetChoice.TARGET_LAND,
|
||
|
new MagicDestroyTargetPicker(false),
|
||
|
this,
|
||
|
"Destroy target land\$."
|
||
|
):
|
||
|
MagicEvent.NONE;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
||
|
event.processTargetPermanent(game,new MagicPermanentAction() {
|
||
|
public void doAction(final MagicPermanent permanent) {
|
||
|
game.doAction(new MagicDestroyAction(permanent));
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
}
|
||
|
]
|