Menu

Submission for Baru, Fist of Krosa

142

Config

name=Baru, Fist of Krosa
image=http://mtgimage.com/card/baru%2C%20fist%20of%20krosa.jpg
value=2.500
rarity=R
type=Legendary,Creature
subtype=Human,Druid
cost={3}{G}{G}
pt=4/4
ability=Whenever a Forest enters the battlefield, green creatures you control get +1/+1 and gain trample until end of turn.
timing=main
requires_groovy_code
oracle=Whenever a Forest enters the battlefield, green creatures you control get +1/+1 and gain trample until end of turn. Grandeur — Discard another card named Baru, Fist of Krosa: Put an X/X green Wurm creature token onto the battlefield, where X is the number of lands you control.

Script

def CARD_NAMED_BARU = new MagicCardFilterImpl() {
    public boolean accept(final MagicGame game,final MagicPlayer player,final MagicCard target) {
        return target.getName().equals("Baru, Fist of Krosa");
    }
    public boolean acceptType(final MagicTargetType targetType) {
        return targetType == MagicTargetType.Hand;
    }
}; 
def A_CARD_NAMED_BARU = new MagicTargetChoice(
    CARD_NAMED_BARU,  
    MagicTargetHint.None,
    "a card named Baru, Fist of Krosa from your hand"
);

[
    new MagicPermanentActivation(
        new MagicActivationHints(MagicTiming.Pump),
        "Grandeur"
    ) {
        @Override
        public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
            return [new MagicDiscardChosenEvent(source,A_CARD_NAMED_BARU)];
        }
        @Override
        public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
            return new MagicEvent(
                source,
                this,
                "Put an X/X green Wurm creature token onto the battlefield, where X is the number of lands you control."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            final int x = event.getPlayer().getNrOfPermanents(MagicType.Land);
            game.doAction(new MagicPlayTokenAction(event.getPlayer(), MagicCardDefinition.create({
                it.setName("Wurm");
                it.setFullName("green Wurm creature token");
                it.setPowerToughness(x, x);
                it.setColors("g");
                it.addSubType(MagicSubType.Wurm);
                it.addType(MagicType.Creature);
                it.setToken();
                it.setValue(x);
            })));
        }
    }
]
Pushed