Package mage.abilities.costs.mana

Examples of mage.abilities.costs.mana.ManaCostsImpl


        this.color.setBlue(true);
        this.power = new MageInt(1);
        this.toughness = new MageInt(1);

        // {2}{U}{U}, {tap}: Counter target spell.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CounterTargetEffect(), new ManaCostsImpl("{2}{U}{U}"));
        ability.addCost(new TapSourceCost());
        ability.addTarget(new TargetSpell());
        this.addAbility(ability);
    }
View Full Code Here


        this.color.setBlack(true);
        this.power = new MageInt(2);
        this.toughness = new MageInt(2);

        // {2}{B}, {tap}: Target player discards a card. Activate this ability only any time you could cast a sorcery.
        Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new DiscardTargetEffect(1), new ManaCostsImpl("{2}{B}"));
        ability.addCost(new TapSourceCost());
        ability.addTarget(new TargetPlayer());
        this.addAbility(ability);
    }
View Full Code Here

        this.color.setRed(true);
        this.power = new MageInt(0);
        this.toughness = new MageInt(4);

        this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl("{R}")));
    }
View Full Code Here

                for (Ability alternateSourceCostsAbility : sourceObject.getAbilities()) {
                    // if cast for noMana no Alternative costs are allowed
                    if (alternateSourceCostsAbility instanceof AlternativeSourceCosts) {                    
                        if (((AlternativeSourceCosts)alternateSourceCostsAbility).isAvailable(ability, game)) {
                            if (alternateSourceCostsAbility.getCosts().canPay(ability, playerId, playerId, game)) {
                                ManaCostsImpl manaCosts = new ManaCostsImpl();
                                for(Cost cost:alternateSourceCostsAbility.getCosts()) {
                                    if (cost instanceof ManaCost) {
                                       manaCosts.add(cost);
                                    }
                                }

                                if (manaCosts.size() == 0) {
                                    return true;
                                }
                                else {
                                    for (Mana mana: manaCosts.getOptions()) {
                                        for (Mana avail: available) {
                                            if (mana.enough(avail)) {
                                                return true;
                                            }
                                        }
View Full Code Here

    public ChannelAbility(String manaString, Effect effect) {
        this(manaString, effect, TimingRule.INSTANT);
    }
   
    public ChannelAbility(String manaString, Effect effect, TimingRule timing) {
        super(Zone.HAND, effect, new ManaCostsImpl(manaString));
        this.addCost(new DiscardSourceCost());
        this.timing = timing;
    }
View Full Code Here

    protected boolean echoPaid;
    protected Costs echoCosts = new CostsImpl();
    private boolean manaEcho = true;

    public EchoAbility(String manaString) {
        super(Zone.BATTLEFIELD, new EchoEffect(new ManaCostsImpl(manaString)), false);
        this.echoPaid = false;
        this.echoCosts.add(new ManaCostsImpl(manaString));
        this.lastController = null;
    }
View Full Code Here

        this.subtype = card.getSubTypes();
        this.supertype = card.getSupertypes();

        this.usesVariousArt = card.usesVariousArt();

        this.manaCost = new ManaCostsImpl(join(card.getManaCosts()));

        this.color = card.getColor();
        this.splitCard = card.isSplitCard();
        this.flipCard = card.isFlipCard();
View Full Code Here

class LavaballTrapAlternativeCost extends AlternativeCostImpl {

    public LavaballTrapAlternativeCost() {
        super("you may pay {3}{R}{R} rather than pay Lavaball Trap's mana cost");
        this.add(new ManaCostsImpl("{3}{R}{R}"));
    }
View Full Code Here

*
* @author Loki
*/
public class TransmuteAbility extends SimpleActivatedAbility {
    public TransmuteAbility(String manaCost) {
        super(Zone.HAND, new TransmuteEffect(), new ManaCostsImpl(manaCost));
        this.setTiming(TimingRule.SORCERY);
        this.addCost(new DiscardSourceCost());
    }
View Full Code Here

    public ErraticPortal(UUID ownerId) {
        super(ownerId, 132, "Erratic Portal", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{4}");
        this.expansionSetCode = "EXO";

        // {1}, {tap}: Return target creature to its owner's hand unless its controller pays {1}.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ErraticPortalEffect(new GenericManaCost(1)), new ManaCostsImpl("{1}"));
        ability.addCost(new TapSourceCost());
        ability.addTarget(new TargetCreaturePermanent());
        this.addAbility(ability);
    }
View Full Code Here

TOP

Related Classes of mage.abilities.costs.mana.ManaCostsImpl

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.