Menu

Submission for Kagemaro, First to Suffer

73

Config

name=Kagemaro, First to Suffer
image=http://mtgimage.com/card/kagemaro%2C%20first%20to%20suffer.jpg
value=2.500
rarity=R
type=Legendary,Creature
subtype=Demon,Spirit
cost={3}{B}{B}
pt=*/*
ability=SN's power and toughness are each equal to the number of cards in your hand.
timing=main
requires_groovy_code
oracle=Kagemaro, First to Suffer's power and toughness are each equal to the number of cards in your hand. {B}, Sacrifice Kagemaro: All creatures get -X/-X until end of turn, where X is the number of cards in your hand.

Script

[
    new MagicPermanentActivation(
        new MagicActivationHints(MagicTiming.Removal),
        "Weaken"
    ) {
		@Override
        public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
            return [new MagicPayManaCostEvent(source,"{B}"), new MagicSacrificeEvent(source)];
        }
        @Override
        public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
            return new MagicEvent(
                source,
                this,
                "All creatures get -X/-X until end of turn, where X is the number of cards in your hand."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            final MagicPlayer player = event.getPlayer();
            Collection<MagicPermanent> creatures = game.filterPermanents(
                player,
                MagicTargetFilterFactory.CREATURE
            )
            final int amt = player.getHandSize();
            for (final MagicPermanent creature : creatures) {
                game.doAction(new MagicChangeTurnPTAction(
                    creature,
                    -amt,
                    -amt
                ));
		}
        }
    }
]
Pushed