Menu

Submission for Ranger of Eos

21

Comment

Alpha, need test. :)

Config

name=Ranger of Eos
image=http://mtgimage.com/card/ranger%20of%20eos.jpg
value=2.500
rarity=R
type=Creature
subtype=Human,Soldier
cost={3}{W}
pt=3/2
timing=main
requires_groovy_code
oracle=When Ranger of Eos enters the battlefield, you may search your library for up to two creature cards with converted mana cost 1 or less, reveal them, and put them into your hand. If you do, shuffle your library.

Script

def CREATURE_CMC_LEQ_1 = new MagicCMCPermanentFilter(
    MagicTargetFilterFactory.CREATURE,
    Operator.LESS_THAN_OR_EQUAL,
    1
);

[
    new MagicWhenComesIntoPlayTrigger() {
        @Override
        public MagicEvent executeTrigger(final MagicGame game, final MagicPermanent permanent, final MagicPermanent died) {
            return new MagicEvent(
                permanent,
                new MagicMayChoice(),
                this,
                "PN may\$ search his or her library for up to two creature cards, reveal them, and put them into PN's hand. "+
                "If PN does, PN shuffles his or her library."
            );
        }

       @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            if (event.isYes()){
                game.addEvent(new MagicSearchToLocationEvent(
                    event,
                    new MagicFromCardFilterChoice(
                        CREATURE_CMC_LEQ_1,
                        2, 
                        true, 
                        "to put into your hand"
                    ),
                    MagicLocationType.OwnersHand
                ));
            }
        }		
    }
]

Pushed