magarena/release/Magarena/scripts/Archon_of_Justice.groovy

29 lines
1.0 KiB
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_PERMANENT,
MagicExileTargetPicker.create(),
this,
"Exile target permanent\$."
):
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 MagicRemoveFromPlayAction(permanent,MagicLocationType.Exile));
}
});
}
}
]