Menu

Submission for

Comment

tested in magarena 1.43

Config

name=Grim Tutor
url=http://magiccards.info/me3/en/69.html
image=http://magiccards.info/scans/en/me3/69.jpg
value=4.271
rarity=R
type=Sorcery
cost={1}{B}{B}
timing=main
requires_groovy_code

Script

def CARD_FROM_LIBRARY = new MagicCardFilterImpl() {
    public boolean accept(final MagicGame game,final MagicPlayer player,final MagicCard target) {
        return true;
    }
    public boolean acceptType(final MagicTargetType targetType) {
        return targetType == MagicTargetType.Library;
    }
};

def A_CARD_FROM_LIBRARY = new MagicTargetChoice(
    CARD_FROM_LIBRARY,
    "a card"
);

[
    new MagicSpellCardEvent() {
        @Override
        public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
            return new MagicEvent(
                cardOnStack,
                this,
                "PN searches his or her library for a card and put it into his or her hand. Then shuffle PN's library."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            game.addEvent(new MagicSearchIntoHandEvent(
                event,
                A_CARD_FROM_LIBRARY
            ));
            game.doAction(new MagicChangeLifeAction(event.getPlayer(),-3));
        }
    }
]
Pushed