Menu

Submission for Deathbringer Regent

110

Config

name=Deathbringer Regent
image=http://magiccards.info/scans/en/dtk/96.jpg
value=2.500
rarity=R
type=Creature
subtype=Dragon
cost={5}{B}{B}
pt=5/6
ability=Flying
timing=main
requires_groovy_code
oracle=Flying. When Deathbringer Regent enters the battlefield, if you cast it from your hand and there are five or more other creatures on the battlefield, destroy all other creatures.

Script

[
    new MagicWhenComesIntoPlayTrigger() {
        @Override
        public MagicEvent executeTrigger(final MagicGame game, final MagicPermanent permanent, final MagicPayedCost payedCost) {
            return (permanent.hasState(MagicPermanentState.CastFromHand) &&
                   game.getNrOfPermanents(MagicType.Creature) >=5) ? 
                new MagicEvent(
                    permanent,
                    this,
                    "Destroy all other creatures."
                ):
                MagicEvent.NONE;
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            final Collection<MagicPermanent> targets= game.filterPermanents(
                event.getPermanent().getController(),
                CREATURE.except(event.getPermanent())
            );
            game.doAction(new MagicDestroyAction(targets));
        }
    }
]
Pushed