magarena/release/Magarena/scripts/Kor_Sanctifiers.groovy

29 lines
978 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_ARTIFACT_OR_ENCHANTMENT,
new MagicDestroyTargetPicker(false),
this,
"Destroy target artifact or 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));
}
});
}
}
]