magarena/release/Magarena/scripts/Petravark.groovy

24 lines
893 B
Groovy

[
new MagicWhenComesIntoPlayTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent, final MagicPayedCost payedCost) {
return new MagicEvent(
permanent,
MagicTargetChoice.TARGET_LAND,
MagicExileTargetPicker.create(),
this,
"Exile target land\$."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
final MagicPermanent permanent = event.getPermanent();
event.processTargetPermanent(game,new MagicPermanentAction() {
public void doAction(final MagicPermanent creature) {
game.doAction(new MagicExileUntilThisLeavesPlayAction(permanent,creature));
}
});
}
}
]