Menu

Submission for Korlash, Heir to Blackblade

87

Config

name=Korlash, Heir to Blackblade
image=http://mtgimage.com/card/korlash%2C%20heir%20to%20blackblade.jpg
value=2.500
rarity=R
type=Legendary,Creature
subtype=Zombie,Warrior
cost={2}{B}{B}
pt=*/*
ability=SN's power and toughness are each equal to the number of Swamps you control.;\
{1}{B}: Regenerate SN.
timing=main
requires_groovy_code
oracle=Korlash, Heir to Blackblade's power and toughness are each equal to the number of Swamps you control. {1}{B}: Regenerate Korlash. Grandeur — Discard another card named Korlash, Heir to Blackblade: Search your library for up to two Swamp cards, put them onto the battlefield tapped, then shuffle your library.

Script

def CARD_NAMED_KORLASH = new MagicCardFilterImpl() {
    public boolean accept(final MagicGame game,final MagicPlayer player,final MagicCard target) {
        return target.getName().equals("Korlash, Heir to Blackblade");
    }
    public boolean acceptType(final MagicTargetType targetType) {
        return targetType == MagicTargetType.Hand;
    }
}; 
def A_CARD_NAMED_KORLASH = new MagicTargetChoice(
    CARD_NAMED_KORLASH,  
    MagicTargetHint.None,
    "a card named Korlash, Heir to Blackblade from your hand"
);

def SWAMP_CARD_FROM_LIBRARY = new MagicCardFilterImpl() {
    public boolean accept(final MagicGame game,final MagicPlayer player,final MagicCard target) {
        return target.hasSubType(MagicSubType.Swamp);
    }
    public boolean acceptType(final MagicTargetType targetType) {
        return targetType == MagicTargetType.Library;
    }
};

[
    new MagicPermanentActivation(
        new MagicActivationHints(MagicTiming.Pump),
        "Grandeur"
    ) {
        @Override
        public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
            return [new MagicDiscardChosenEvent(source,A_CARD_NAMED_KORLASH)];
        }
        @Override
        public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
            return new MagicEvent(
                source,
                this,
                "PN searches his or her library for up to two Swamp cards, "+
                "puts them onto the battlefield tapped, then shuffles his or her library."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
     game.addEvent(new MagicSearchOntoBattlefieldEvent(
                event,
                new MagicFromCardFilterChoice(
                    SWAMP_CARD_FROM_LIBRARY,
                    2, 
                    true, 
                    "to put onto the battlefield tapped"
                ),
                MagicPlayMod.TAPPED
            ));
        }
    }
]
Pushed