Package mage

Examples of mage.Mana


        // As an additional cost to cast Culling the Weak, sacrifice a creature.
        this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(new FilterControlledCreaturePermanent("a creature"))));
       
        // Add {B}{B}{B}{B} to your mana pool.
        this.getSpellAbility().addEffect(new BasicManaEffect(new Mana(0, 0, 0, 0, 4, 0, 0)));
    }
View Full Code Here


    protected Mana cost;
    protected ManaOptions options;
    protected Filter sourceFilter;

    public ManaCostImpl() {
        payment = new Mana();
        options = new ManaOptions();
    }
View Full Code Here

    protected ColoredManaSymbol mana;

    public ColoredManaCost(ColoredManaSymbol mana) {
        this.mana = mana;
        this.cost = new Mana(mana);
        addColoredOption(mana);
    }
View Full Code Here

    }

    @Override
    public boolean apply(Game game, Ability source, Ability abilityToModify) {
        SpellAbility spellAbility = (SpellAbility)abilityToModify;
        Mana mana = spellAbility.getManaCostsToPay().getMana();
        if (mana.getColorless() > 0) {
            int count = game.getBattlefield().count(filter, source.getSourceId(), source.getControllerId(), game);
            int newCount = mana.getColorless() - count;
            if (newCount < 0) {
                newCount = 0;
            }
            mana.setColorless(newCount);
            spellAbility.getManaCostsToPay().load(mana.toString());
            return true;
        }
        return false;
    }
View Full Code Here

        return total;
    }

    @Override
    public Mana getMana() {
        Mana mana = new Mana();
        for (ManaCost cost : this) {
            mana.add(cost.getMana());
        }
        return mana;
    }
View Full Code Here

        return mana;
    }

    @Override
    public Mana getPayment() {
        Mana manaTotal = new Mana();
        for (ManaCost cost : this) {
            manaTotal.add(cost.getPayment());
        }
        return manaTotal;
    }
View Full Code Here

    private final ColoredManaSymbol mana;
    private int mana2 = 2;

    public MonoHybridManaCost(ColoredManaSymbol mana) {
        this.mana = mana;
        this.cost = new Mana(mana);
        this.cost.add(Mana.ColorlessMana(2));
        addColoredOption(mana);
        options.add(Mana.ColorlessMana(2));
    }
View Full Code Here

        this(1);
    }

    public VariableManaCost(int multiplier) {
        this.multiplier = multiplier;
        this.cost = new Mana();
        options.add(new Mana());
    }
View Full Code Here

    private final ColoredManaSymbol mana2;

    public HybridManaCost(ColoredManaSymbol mana1, ColoredManaSymbol mana2) {
        this.mana1 = mana1;
        this.mana2 = mana2;
        this.cost = new Mana(mana1);
        this.cost.add(new Mana(mana2));
        addColoredOption(mana1);
        addColoredOption(mana2);
    }
View Full Code Here

        super(ownerId, 137, "Turn to Dust", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{G}");
        this.expansionSetCode = "MRD";
        this.color.setGreen(true);
        this.getSpellAbility().addEffect(new DestroyTargetEffect());
        this.getSpellAbility().addTarget(new TargetPermanent(filter));
        this.getSpellAbility().addEffect(new BasicManaEffect(new Mana(0, 1, 0, 0, 0, 0, 0)));
    }
View Full Code Here

TOP

Related Classes of mage.Mana

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.