magarena/release/Magarena/scripts/Polluted_Dead.groovy

29 lines
1010 B
Groovy
Raw Normal View History

2013-05-18 19:26:18 -07:00
[
new MagicWhenPutIntoGraveyardTrigger() {
2013-04-12 19:32:25 -07:00
@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,
2013-05-18 19:26:18 -07:00
"Destroy target land\$."
2013-04-12 19:32:25 -07:00
):
MagicEvent.NONE;
}
@Override
2013-05-18 19:26:18 -07:00
public void executeEvent(final MagicGame game, final MagicEvent event) {
2013-04-12 19:32:25 -07:00
event.processTargetPermanent(game,new MagicPermanentAction() {
public void doAction(final MagicPermanent permanent) {
game.doAction(new MagicDestroyAction(permanent));
}
});
}
2013-05-18 19:26:18 -07:00
}
]