magarena/release/Magarena/scripts/Vandalblast.groovy

25 lines
893 B
Groovy

[
new MagicOverloadActivation(MagicTiming.Removal) {
@Override
public Iterable<MagicEvent> getCostEvent(final MagicCard source) {
return [
new MagicPayManaCostEvent(source,"{4}{R}")
];
}
@Override
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
return new MagicEvent(
cardOnStack,
this,
"Destroy each artifact you don't control."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
final Collection<MagicPermanent> targets=
game.filterPermanents(event.getPlayer(),MagicTargetFilter.TARGET_ARTIFACT_YOUR_OPPONENT_CONTROLS);
game.doAction(new MagicDestroyAction(targets));
}
}
]