29 lines
1.0 KiB
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));
|
|
}
|
|
});
|
|
}
|
|
}
|
|
]
|