Menu

Submission for Butcher of the Horde

168

Config

name=Butcher of the Horde
image=http://mtgimage.com/card/butcher%20of%20the%20horde.jpg
value=2.500
rarity=R
type=Creature
subtype=Demon
cost={1}{R}{W}{B}
pt=5/4
ability=Flying
timing=main
requires_groovy_code
oracle=Flying. Sacrifice another creature: Butcher of the Horde gains your choice of vigilance, lifelink, or haste until end of turn.

Script

[
    new MagicPermanentActivation(
        new MagicActivationHints(MagicTiming.Pump),
        "Choice"
    ) {
        @Override
        public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
            final MagicTargetChoice targetChoice = new MagicTargetChoice(
                new MagicOtherPermanentTargetFilter(
                    MagicTargetFilterFactory.CREATURE_YOU_CONTROL,
                    source
                ),
                MagicTargetHint.None,
                "a creature other than " + source + " to sacrifice"
            );
            return [
                new MagicSacrificePermanentEvent(
                    source,
                    targetChoice
                )
            ];
        }
        @Override
        public MagicEvent getPermanentEvent(final MagicPermanent source, final MagicPayedCost payedCost) {
            return new MagicEvent(
                source,
                new MagicOrChoice(
                    MagicChoice.NONE,
                    MagicChoice.NONE,
                    MagicChoice.NONE
                ),
                this,
                "Choose one\$ - vigilance(1); lifelink(2); haste(3)"
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            if (event.isMode(1)) {
                game.doAction(new MagicGainAbilityAction(event.getPermanent(),MagicAbility.Vigilance));
            } else if (event.isMode(2)){
                game.doAction(new MagicGainAbilityAction(event.getPermanent(),MagicAbility.Lifelink));
            } else if (event.isMode(3)){
                game.doAction(new MagicGainAbilityAction(event.getPermanent(),MagicAbility.Haste));
            }
        }
    }
]
Pushed