Menu

Submission for Cateran Kidnappers

122

Config

name=Cateran Kidnappers
url=http://magiccards.info/mm/en/122.html
image=http://mtgimage.com/card/cateran%20kidnappers.jpg
value=2.917
rarity=U
type=Creature
subtype=Human,Mercenary
cost={2}{B}{B}
pt=4/2
timing=main
requires_groovy_code

Script

def MERCENARY_CMC_3_OR_LESS = new MagicCardFilterImpl() {
    public boolean accept(final MagicGame game,final MagicPlayer player,final MagicCard target) {
        return target.hasSubType(MagicSubType.Mercenary) && target.getConvertedCost() <= 3;
    }
    public boolean acceptType(final MagicTargetType targetType) {
        return targetType==MagicTargetType.Library;
    }
};

[
    new MagicPermanentActivation(
        new MagicActivationHints(MagicTiming.Main),
        "Search"
    ) {
        @Override
        public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
            return [new MagicTapEvent(source), new MagicPayManaCostEvent(source, "{3}")];
        }

        @Override
        public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
            return new MagicEvent(
                source,
                this,
                "PN searches his or her library for a Mercenary permanent card with converted mana cost 3 or less and puts that card onto the battlefield. Then shuffle PN's library."
            );
        }
        
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            game.addEvent(new MagicSearchOntoBattlefieldEvent(
                event,
                new MagicTargetChoice(MERCENARY_CMC_3_OR_LESS, "a Mercenary permanent card with converted mana cost 3 or less")    
            ));
        }
    }
]
Pushed