26 lines
917 B
Groovy
26 lines
917 B
Groovy
[
|
|
new MagicWhenComesIntoPlayTrigger() {
|
|
@Override
|
|
public MagicEvent executeTrigger(final MagicGame game, final MagicPermanent permanent, final MagicPayedCost payedCost) {
|
|
return payedCost.isKicked() ?
|
|
new MagicEvent(
|
|
permanent,
|
|
MagicTargetChoice.NEG_TARGET_ENCHANTMENT,
|
|
new MagicDestroyTargetPicker(false),
|
|
this,
|
|
"Destroy target enchantment\$."
|
|
):
|
|
MagicEvent.NONE;
|
|
}
|
|
|
|
@Override
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
|
event.processTargetPermanent(game,new MagicPermanentAction() {
|
|
public void doAction(final MagicPermanent target) {
|
|
game.doAction(new MagicDestroyAction(target));
|
|
}
|
|
});
|
|
}
|
|
}
|
|
]
|