Package mage.abilities.costs.mana

Examples of mage.abilities.costs.mana.ManaCostsImpl



public class BloodrushAbility extends ActivatedAbilityImpl {

    public BloodrushAbility(String manaString, Effect effect) {
        super(Zone.HAND, effect, new ManaCostsImpl(manaString));
        this.addCost(new DiscardSourceCost());
        this.addTarget(new TargetAttackingCreature());
    }
View Full Code Here


    private static final String reminderText = "<i> (Choose both if you pay the entwine cost.)</i>";
    protected OptionalAdditionalCost additionalCost;

    public EntwineAbility(String manaString) {
       super(Zone.STACK, null);
       this.additionalCost = new OptionalAdditionalCostImpl(keywordText, reminderText, new ManaCostsImpl(manaString));
    }
View Full Code Here

    private Costs spliceCosts = new CostsImpl();
    private boolean nonManaCosts = false;

    public SpliceOntoArcaneAbility(String manaString) {
        super(Zone.HAND, new SpliceOntoArcaneEffect());
        spliceCosts.add(new ManaCostsImpl(manaString));
    }
View Full Code Here

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

        this.addAbility(new IslandwalkAbility());
        SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new ManaCostsImpl("{2}{U}"));
        ability.addTarget(new TargetCreaturePermanent(filter));
        this.addAbility(ability);
    }
View Full Code Here

    public boolean apply(Game game, Ability source) {
        Player player = game.getPlayer(source.getControllerId());
        Permanent permanent = game.getPermanent(source.getSourceId());
        if (player != null && permanent != null) {
            if (player.chooseUse(Outcome.Damage, new StringBuilder("Extort opponents? (").append(permanent.getName()).append(")").toString(), game)) {
                Cost cost = new ManaCostsImpl("{W/B}");
                if (cost.pay(source, game, source.getSourceId(), player.getId(), false)) {
                    int loseLife = 0;
                    for (UUID opponentId : game.getOpponents(source.getControllerId())) {
                        loseLife += game.getPlayer(opponentId).loseLife(1, game);
                    }
                    if (loseLife > 0) {
View Full Code Here

        Permanent creature = game.getPermanentOrLKIBattlefield(creatureId);
        Player controller = game.getPlayer(source.getControllerId());
        if (creature != null && controller != null) {
            if (controller.chooseUse(Outcome.Damage, "Pay {2}{R} to do the damage?", game)) {
         // if (controller.chooseUse(Outcome.Damage, "Pay {2}{R}? If you do, " + creature.getName() + " deals damage equal to its power to target creature or player.", game)) {
                ManaCosts manaCosts = new ManaCostsImpl("{2}{R}");
                if (manaCosts.pay(source, game, source.getSourceId(), controller.getId(), false)) {
                    int amount = creature.getPower().getValue();
                    UUID target = source.getTargets().getFirstTarget();
                    Permanent targetCreature = game.getPermanent(target);
                    if (targetCreature != null) {
                        targetCreature.damage(amount, creature.getId(), game, false, true);
View Full Code Here

    public ProwlAbility copy() {
       return new ProwlAbility(this);
    }

    public final AlternativeCost2 addProwlCost(String manaString) {
       AlternativeCost2 prowlCost = new AlternativeCost2Impl(PROWL_KEYWORD, reminderText, new ManaCostsImpl(manaString));
       prowlCosts.add(prowlCost);
       return prowlCost;
    }
View Full Code Here

        Player player = game.getPlayer(source.getControllerId());
        Permanent permanent = game.getPermanent(source.getSourceId());
        if (player != null && permanent != null) {
            int ageCounter = permanent.getCounters().getCount(CounterType.AGE);
            if(cumulativeCost instanceof ManaCost){
                ManaCostsImpl totalCost = new ManaCostsImpl();
                for(int i = 0 ; i < ageCounter; i++){
                    totalCost.add(cumulativeCost.copy());
                }
                if (player.chooseUse(Outcome.Benefit, "Pay " + totalCost.getText() + "?", game)) {
                    totalCost.clearPaid();
                    if (totalCost.payOrRollback(source, game, source.getSourceId(), source.getControllerId())){
                        return true;
                    }
                }
                permanent.sacrifice(source.getSourceId(), game);
                return true;   
            }
            else{
                CostsImpl totalCost = new CostsImpl();
                for(int i = 0 ; i < ageCounter; i++){
                    totalCost.add(cumulativeCost.copy());
                }
                if (player.chooseUse(Outcome.Benefit, totalCost.getText() + "?", game)) {
                    totalCost.clearPaid();
                    int bookmark = game.bookmarkState();
                    if (totalCost.pay(source, game, source.getSourceId(), source.getControllerId(), false)){
                        return true;
                    }
                    else{
                        game.restoreState(bookmark, source.getRule());
                    }
View Full Code Here

        this.color.setGreen(true);
        this.subtype.add("Snake");
        this.power = new MageInt(2);
        this.toughness = new MageInt(1);
        this.addAbility(new IslandwalkAbility());
        this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new ManaCostsImpl("{G}")));
    }
View Full Code Here

class ArrowVolleyTrapAlternativeCost extends AlternativeCostImpl {

    public ArrowVolleyTrapAlternativeCost() {
        super("you may pay {1}{W} rather than pay Arrow Volley Trap's mana cost");
        this.add(new ManaCostsImpl("{1}{W}"));
    }
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.