Menu

Submission for Sandstone Deadfall

307

Config

name=Sandstone Deadfall
image=http://mtgimage.com/card/sandstone%20deadfall.jpg
value=2.500
rarity=U
type=Artifact
cost={3}
timing=artifact
requires_groovy_code
oracle={T}, Sacrifice two lands and Sandstone Deadfall: Destroy target attacking creature.

Script

[
    new MagicPermanentActivation(
        new MagicActivationHints(MagicTiming.Removal),
        "Destroy"
    ) {
        @Override
        public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
            return [
                new MagicTapEvent(source),
                new MagicSacrificePermanentEvent(source,MagicTargetChoice.SACRIFICE_LAND),
                new MagicSacrificePermanentEvent(source,MagicTargetChoice.SACRIFICE_LAND),
                new MagicSacrificeEvent(source)
            ];
        }

        @Override
        public MagicEvent getPermanentEvent(final MagicPermanent source, final MagicPayedCost payedCost) {
            return new MagicEvent(
                source,
                MagicTargetChoice.NEG_TARGET_ATTACKING_CREATURE,
                MagicDestroyTargetPicker.Destroy,
                this,
                "Destroy target attacking creature\$."
            );
        }

        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            event.processTargetPermanent(game, {
                game.doAction(new MagicDestroyAction(it));
            });
        }
    }
]
Pushed