Menu

Submission for Aphetto Grifter

65

Config

name=Aphetto Grifter
image=http://mtgimage.com/card/aphetto%20grifter.jpg
value=2.500
rarity=U
type=Creature
subtype=Human,Wizard
cost={2}{U}
pt=1/1
timing=main
requires_groovy_code
oracle=Tap two untapped Wizards you control: Tap target permanent.

Script

def UNTAPPED_WIZARD_YOU_CONTROL=new MagicPermanentFilterImpl(){
    public boolean accept(final MagicGame game,final MagicPlayer player,final MagicPermanent target)
    {
        return target.hasSubType(MagicSubType.Wizard) &&  
               target.isUntapped() && 
               target.isController(player);
    }
};

def TWO_UNTAPPED_WIZARD_CONDITION = new MagicCondition() {
    public boolean accept(final MagicSource source) {
        return source.getController().getNrOfPermanents(UNTAPPED_WIZARD_YOU_CONTROL) >= 2;
    }
};

def AN_UNTAPPED_WIZARD_YOU_CONTROL = new MagicTargetChoice(UNTAPPED_WIZARD_YOU_CONTROL,"an untapped Wizard you control");

[
    new MagicPermanentActivation(
        [TWO_UNTAPPED_WIZARD_CONDITION],
        new MagicActivationHints(MagicTiming.Removal),
        "Untap"
    ) {
        @Override
        public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
            return [
                new MagicTapPermanentEvent(source, AN_UNTAPPED_WIZARD_YOU_CONTROL),
                new MagicTapPermanentEvent(source, AN_UNTAPPED_WIZARD_YOU_CONTROL)
            ];
        }

        @Override
        public MagicEvent getPermanentEvent(final MagicPermanent source, final MagicPayedCost payedCost) {
            return MagicRuleEventAction.create(source, "Tap target permanent.");
        }
    }
]
Pushed