Package mage.abilities.costs

Examples of mage.abilities.costs.AlternativeCostSourceAbility.addCost()


        this.color.setRed(true);
        this.color.setGreen(true);

        // You may pay {1} and return a basic land you control to its owner's hand rather than pay Firewild Borderpost's mana cost.
        Ability ability = new AlternativeCostSourceAbility(new GenericManaCost(1));
        ability.addCost(new ReturnToHandTargetCost(new TargetControlledPermanent(filter)));
        this.addAbility(ability);

        // Veinfire Firewild enters the battlefield tapped.
        this.addAbility(new EntersBattlefieldTappedAbility());
View Full Code Here


        this.color.setBlue(true);
        this.color.setBlack(true);

        // You may pay {1} and return a basic land you control to its owner's hand rather than pay Mistvein Borderpost's mana cost.
        Ability ability = new AlternativeCostSourceAbility(new GenericManaCost(1));
        ability.addCost(new ReturnToHandTargetCost(new TargetControlledPermanent(filter)));
        this.addAbility(ability);

         // Mistvein Borderpost enters the battlefield tapped.
        this.addAbility(new EntersBattlefieldTappedAbility());
View Full Code Here

        this.color.setGreen(true);
        this.color.setWhite(true);

        // You may pay {1} and return a basic land you control to its owner's hand rather than pay Wildfield Borderpost's mana cost.
        Ability ability = new AlternativeCostSourceAbility(new GenericManaCost(1));
        ability.addCost(new ReturnToHandTargetCost(new TargetControlledPermanent(filter)));
        this.addAbility(ability);

        // Wildfield Borderpost enters the battlefield tapped.
        this.addAbility(new EntersBattlefieldTappedAbility());
View Full Code Here

        this.color.setWhite(true);
        this.color.setBlue(true);

        // You may pay {1} and return a basic land you control to its owner's hand rather than pay Fieldmist Borderpost's mana cost.
        Ability ability = new AlternativeCostSourceAbility(new GenericManaCost(1));
        ability.addCost(new ReturnToHandTargetCost(new TargetControlledPermanent(filter)));
        this.addAbility(ability);

        // Fieldmist Borderpost enters the battlefield tapped.
        this.addAbility(new EntersBattlefieldTappedAbility());
View Full Code Here

        FilterOwnedCard filter = new FilterOwnedCard("blue card 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

        AlternativeCostSourceAbility ability = new AlternativeCostSourceAbility(new PayLifeCost(1));
        ability.addCost(new ExileFromHandCost(new TargetCardInHand(filter)));
        this.addAbility(ability);         
              
        // Counter target spell.
        this.getSpellAbility().addEffect(new CounterTargetEffect());
        this.getSpellAbility().addTarget(new TargetSpell());
View Full Code Here

        filter.add(new ColorPredicate(ObjectColor.BLACK));
        filter.add(Predicates.not(new CardIdPredicate(this.getId()))); // the exile cost can never be paid with the card itself
       
        // You may pay 1 life and exile a black card from your hand rather than pay Contagion's mana cost.
        AlternativeCostSourceAbility ability = new AlternativeCostSourceAbility(new PayLifeCost(1));
        ability.addCost(new ExileFromHandCost(new TargetCardInHand(filter)));
        this.addAbility(ability)
       
        // Distribute two -2/-1 counters among one or two target creatures.
        this.getSpellAbility().addTarget(new TargetCreaturePermanentAmount(2));
        this.getSpellAbility().addEffect(new DistributeCountersEffect());
View Full Code Here

        this.power = new MageInt(9);
        this.toughness = new MageInt(9);
       
        // You may pay 6 life and sacrifice three black creatures rather than pay Demon of Death's Gate's mana cost
        AlternativeCostSourceAbility alternateCosts = new AlternativeCostSourceAbility(new PayLifeCost(6));
        alternateCosts.addCost(new SacrificeTargetCost(new TargetControlledPermanent(3, 3, filter, false)));
        this.addAbility(alternateCosts);

        this.addAbility(FlyingAbility.getInstance());
        this.addAbility(TrampleAbility.getInstance());
    }
View Full Code Here

        this.color.setBlack(true);
        this.color.setRed(true);

        // You may pay {1} and return a basic land you control to its owner's hand rather than pay Veinfire Borderpost's mana cost.
        Ability ability = new AlternativeCostSourceAbility(new GenericManaCost(1));
        ability.addCost(new ReturnToHandTargetCost(new TargetControlledPermanent(filter)));
        this.addAbility(ability);

        // Veinfire Borderpost enters the battlefield tapped.
        this.addAbility(new EntersBattlefieldTappedAbility());
View Full Code Here

        this.color.setBlue(true);

        // You may discard an Island card and another card rather than pay Foil's mana cost.
        Ability ability = new AlternativeCostSourceAbility(new DiscardTargetCost(new TargetCardInHand(filter)));
        ability.addCost(new DiscardTargetCost(new TargetCardInHand(new FilterCard("another card"))));
        this.addAbility(ability);

        // Counter target spell.
        this.getSpellAbility().addEffect(new CounterTargetEffect());
        this.getSpellAbility().addTarget(new TargetSpell());
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.