Menu

Submission for Lyzolda, the Blood Witch

117

Config

name=Lyzolda, the Blood Witch
image=http://mtgimage.com/card/lyzolda%2C%20the%20blood%20witch.jpg
value=2.500
rarity=R
type=Legendary,Creature
subtype=Human,Cleric
cost={1}{B}{R}
pt=3/1
timing=main
requires_groovy_code
oracle={2}, Sacrifice a creature: Lyzolda, the Blood Witch deals 2 damage to target creature or player if the sacrificed creature was red. Draw a card if the sacrificed creature was black.

Script

[
    new MagicPermanentActivation(
        new MagicActivationHints(MagicTiming.Removal),
        "Sacrifice"
    ) {
        @Override
        public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
            return [
                new MagicPayManaCostEvent(source,"{2}"),
                new MagicSacrificePermanentEvent(source,MagicTargetChoice.SACRIFICE_CREATURE)
            ];
        }

        @Override
        public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
            return new MagicEvent(
                source,
                MagicTargetChoice.NEG_TARGET_CREATURE_OR_PLAYER,
                payedCost.getTarget(),
                this,
                "SN deals 2 damage to target creature or player if RN was red. Draw a card if RN was black."
            );
        }

        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            event.processTarget(game, {
                final MagicPermanent sacrificed=event.getRefPermanent();
                if (sacrificed.hasColor(MagicColor.Red)) {
                    game.doAction(new MagicDealDamageAction(event.getSource(),it,2));
                }
                if (sacrificed.hasColor(MagicColor.Black)) { 
                    game.doAction(new MagicDrawAction(event.getPlayer(),1));
                }
            });
        }
    }
]
Pushed