Menu

Submission for Viridian Revel

132

Config

name=Viridian Revel
image=http://mtgimage.com/card/viridian%20revel.jpg
value=2.500
rarity=U
type=Enchantment
cost={1}{G}{G}
timing=enchantment
requires_groovy_code
oracle=Whenever an artifact is put into an opponent's graveyard from the battlefield, you may draw a card.

Script

[
    new MagicWhenOtherDiesTrigger() {
        @Override
        public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent otherPermanent) {
            return (otherPermanent.hasType(MagicType.Artifact) && otherPermanent.isEnemy(permanent)) ?
                new MagicEvent(
                    permanent,
                    new MagicSimpleMayChoice(
                        MagicSimpleMayChoice.DRAW_CARDS,
                        1,
                        MagicSimpleMayChoice.DEFAULT_YES
                    ),
                    this,
                    "PN may\$ draw a card."
                ) :
                MagicEvent.NONE;
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            if (event.isYes()){
            game.doAction(new MagicDrawAction(event.getPlayer()));
            }
        }
    }
]
Pushed