magarena/release/Magarena/scripts/Nature_s_Claim.groovy

24 lines
937 B
Groovy

[
new MagicSpellCardEvent() {
@Override
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
return new MagicEvent(
cardOnStack,
MagicTargetChoice.NEG_TARGET_ARTIFACT_OR_ENCHANTMENT,
new MagicDestroyTargetPicker(false),
this,
"Destroy target artifact or enchantment\$. Its controller gains 4 life."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetPermanent(game,new MagicPermanentAction() {
public void doAction(final MagicPermanent permanent) {
game.doAction(new MagicDestroyAction(permanent));
game.doAction(new MagicChangeLifeAction(permanent.getController(),4));
}
});
}
}
]