magarena/release/Magarena/scripts/Ulamog__the_Infinite_Gyre.g...

30 lines
958 B
Groovy

[
new MagicWhenSpellIsCastTrigger() {
@Override
public MagicEvent executeTrigger(
final MagicGame game,
final MagicPermanent permanent,
final MagicCardOnStack spell) {
return new MagicEvent(
spell,
MagicTargetChoice.NEG_TARGET_PERMANENT,
new MagicDestroyTargetPicker(false),
this,
"Destroy target permanent\$."
);
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
event.processTargetPermanent(game,new MagicPermanentAction() {
public void doAction(final MagicPermanent creature) {
game.doAction(new MagicDestroyAction(creature));
}
});
}
},
MagicWhenPutIntoGraveyardTrigger.RecoverGraveyard
]