Menu

Submission for Ensnare

32

Config

name=Ensnare
image=http://mtgimage.com/card/ensnare.jpg
value=2.500
rarity=U
type=Instant
cost={3}{U}
effect=Tap all creatures.
timing=tapping
requires_groovy_code
oracle=You may return two Islands you control to their owner's hand rather than pay Ensnare's mana cost. Tap all creatures.

Script

def TWO_ISLANDS_CONDITION = new MagicCondition() {
    public boolean accept(final MagicSource source) {
        return source.getController().getNrOfPermanents(MagicSubType.Island) >= 2;
    }
};

def choice = new MagicTargetChoice("an Island you control");
[
     new MagicCardActivation(
        [TWO_ISLANDS_CONDITION, MagicCondition.CARD_CONDITION],
        new MagicActivationHints(MagicTiming.Tapping),
        "NoCost"
    ) {

        @Override
        public Iterable<MagicEvent> getCostEvent(final MagicCard source) {
            return [ 
            new MagicBounceChosenPermanentEvent(source,choice),
            new MagicBounceChosenPermanentEvent(source,choice)
            ];
        }
    }
]
Pushed