Menu

Submission for Lost Auramancers

11

Config

name=Lost Auramancers
image=http://mtgimage.com/card/lost%20auramancers.jpg
value=2.500
rarity=U
type=Creature
subtype=Human,Wizard
cost={2}{W}{W}
pt=3/3
ability=Vanishing 3
timing=main
requires_groovy_code
oracle=Vanishing 3. When Lost Auramancers dies, if it had no time counters on it, you may search your library for an enchantment card and put it onto the battlefield. If you do, shuffle your library.

Script

def choice = new MagicTargetChoice("an enchantment card from your library");
[
    new MagicWhenDiesTrigger() {
        @Override
        public MagicEvent executeTrigger(final MagicGame game, final MagicPermanent permanent, final MagicPermanent died) {
            return permanent.getCounters(MagicCounterType.Time) == 0 ?
                new MagicEvent(
                    permanent,
                    new MagicMayChoice(),
                    this,
                    "PN may\$ search your library for an enchantment card and put it onto the battlefield. " +
                    "If you do, shuffle your library."
                ) :
                MagicEvent.NONE;
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            if (event.isYes()) {
                game.addEvent(new MagicSearchOntoBattlefieldEvent(
                    event.getSource(),
                    event.getPlayer(),
                    choice
                ));   
            }
        }
    }
]
Pushed