Menu

Submission for Painwracker Oni

136

Config

name=Painwracker Oni
image=http://mtgimage.com/card/painwracker%20oni.jpg
value=2.500
rarity=U
type=Creature
subtype=Demon,Spirit
cost={3}{B}{B}
pt=5/4
ability=Fear
timing=main
requires_groovy_code
oracle=Fear. At the beginning of your upkeep, sacrifice a creature if you don't control an Ogre.

Script

[
    new MagicAtUpkeepTrigger() {
        @Override
        public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPlayer upkeepPlayer) {
            return permanent.isController(upkeepPlayer) && 
permanent.getController().controlsPermanent(MagicSubType.Ogre) == false ?
                new MagicEvent(
                    permanent,
                    this,
                    "If PN controls no Ogres, sacrifice a creature."
                ):
                MagicEvent.NONE;
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            if (event.getPlayer().controlsPermanent(MagicSubType.Ogre) == false) {
                game.addEvent(new MagicSacrificePermanentEvent(event.getPermanent(),event.getPlayer(),MagicTargetChoice.SACRIFICE_CREATURE));
            }
        }
    }
]
Pushed