Examples of CardIdPredicate


Examples of mage.filter.predicate.mageobject.CardIdPredicate

        this.color.setBlue(true);

        // You may exile a blue card with converted mana cost X from your hand rather than pay Disrupting Shoal's mana cost.
        FilterOwnedCard filter = new FilterOwnedCard("a blue card with converted mana cost X from your hand");
        filter.add(new ColorPredicate(ObjectColor.BLUE));
        filter.add(Predicates.not(new CardIdPredicate(this.getId()))); // the exile cost can never be paid with the card itself
        this.addAbility(new AlternativeCostSourceAbility(new ExileFromHandCost(new TargetCardInHand(filter))));

        // 2/1/2005: Disrupting Shoal can target any spell, but does nothing unless that spell's converted mana cost is X.
        // Counter target spell if its converted mana cost is X.
        this.getSpellAbility().addEffect(new DisruptingShoalCounterTargetEffect());
View Full Code Here

Examples of mage.filter.predicate.mageobject.CardIdPredicate

        this.color.setGreen(true);
        this.power = new MageInt(6);
        this.toughness = new MageInt(6);

        FilterCreaturePermanent filter = new FilterCreaturePermanent();
        filter.add(new CardIdPredicate(this.getId()));

        // Whenever Gruul Ragebeast or another creature enters the battlefield under your control, that creature fights target creature an opponent controls.
        Ability ability = new GruulRagebeastTriggeredAbility();

        ability.addTarget(new TargetCreaturePermanent(filter2));
View Full Code Here

Examples of mage.filter.predicate.mageobject.CardIdPredicate

        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());
        this.getSpellAbility().addEffect(new ReturnToHandTargetEffect());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.