Package mage.filter.predicate.mageobject

Examples of mage.filter.predicate.mageobject.ColorPredicate


            return false;
        }
        //Set the mana cost one higher to 'emulate' a less than or equal to comparison.
        int xValue = source.getManaCostsToPay().getX() + 1;
        FilterCard filter = new FilterCard("green creature card with converted mana cost " + xValue + " or less");
        filter.add(new ColorPredicate(ObjectColor.GREEN));
        filter.add(new CardTypePredicate(CardType.CREATURE));
       
        filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, xValue));
        TargetCardInLibrary target = new TargetCardInLibrary(filter);
        if (player.searchLibrary(target, game)) {
View Full Code Here


        this.color.setBlue(true);

        // You may exile a blue card from your hand rather than pay Snapback's mana cost.
        FilterOwnedCard filterCardInHand = new FilterOwnedCard("a blue card from your hand");
        filterCardInHand.add(new ColorPredicate(ObjectColor.BLUE));
        filterCardInHand.add(Predicates.not(new CardIdPredicate(this.getId())));      
        this.addAbility(new AlternativeCostSourceAbility(new ExileFromHandCost(new TargetCardInHand(filterCardInHand))));
       
        // Return target creature to its owner's hand.
        this.getSpellAbility().addTarget(new TargetCreaturePermanent());
View Full Code Here

TOP

Related Classes of mage.filter.predicate.mageobject.ColorPredicate

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.