Menu

Submission for Takenuma Bleeder

86

Comment

Adapted from Stenchskipper

Config

name=Takenuma Bleeder
image=http://mtgimage.com/card/takenuma%20bleeder.jpg
value=2.500
rarity=C
type=Creature
subtype=Ogre,Shaman
cost={2}{B}
pt=3/3
timing=main
requires_groovy_code
oracle=Whenever Takenuma Bleeder attacks or blocks, you lose 1 life if you don't control a Demon.

Script

[
    new MagicWhenAttacksTrigger() {
        @Override
        public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent attacker) {
            return permanent == attacker && permanent.getController().controlsPermanent(MagicSubType.Demon) == false ?
                new MagicEvent(
                    permanent,
                    this,
                    "If PN controls no Demons, lose 1 life."
                ):
                MagicEvent.NONE;
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            if (event.getPlayer().controlsPermanent(MagicSubType.Demon) == false) {
                game.doAction(new MagicChangeLifeAction(event.getPlayer(),-1));
            }
        }
    },	
	new MagicWhenBlocksTrigger() {
        @Override
        public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent blocker) {
		final MagicPermanent blocked = permanent.getBlockedCreature();
            return (permanent == blocker && blocked.isValid()) && permanent.getController().controlsPermanent(MagicSubType.Demon) == false ?
                new MagicEvent(
                    permanent,
                    this,
                    "If PN controls no Demons, lose 1 life."
                ):
                MagicEvent.NONE;
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            if (event.getPlayer().controlsPermanent(MagicSubType.Demon) == false) {
                game.doAction(new MagicChangeLifeAction(event.getPlayer(),-1));
            }
        }
    }
]
Pushed