Package mage

Examples of mage.Mana


    colorless = 0;
    return total;
  }

  public Mana getMana() {
    Mana mana = new Mana();
    mana.setBlack(black);
    mana.setBlue(blue);
    mana.setColorless(colorless);
    mana.setGreen(green);
    mana.setRed(red);
    mana.setWhite(white);
    return mana;
  }
View Full Code Here


    }
  }

  public void addMana(List<ManaAbility> abilities, Game game) {
    if (isEmpty())
      this.add(new Mana());
    if (!abilities.isEmpty()) {
      if (abilities.size() == 1) {
        //if there is only one mana option available add it to all the existing options
        addMana(abilities.get(0).getNetMana(game));
      }
      else if (abilities.size() > 1) {
        //perform a union of all existing options and the new options
        List<Mana> copy = copy();
        this.clear();
        for (ManaAbility ability: abilities) {
          for (Mana mana: copy) {
            Mana newMana = new Mana();
            newMana.add(mana);
            newMana.add(ability.getNetMana(game));
            this.add(newMana);
          }
        }
      }
    }
View Full Code Here

    }
  }

  public void addMana(Mana addMana) {
    if (isEmpty())
      this.add(new Mana());
    for (Mana mana: this) {
      mana.add(addMana);
    }
  }
View Full Code Here

    }
  }

  public void addMana(ManaOptions options) {
    if (isEmpty())
      this.add(new Mana());
    if (!options.isEmpty()) {
      if (options.size() == 1) {
        //if there is only one mana option available add it to all the existing options
        addMana(options.get(0));
      }
      else if (options.size() > 1) {
        //perform a union of all existing options and the new options
        List<Mana> copy = copy();
        this.clear();
        for (Mana addMana: options) {
          for (Mana mana: copy) {
            Mana newMana = new Mana();
            newMana.add(mana);
            newMana.add(addMana);
            this.add(newMana);
          }
        }
      }
    }
View Full Code Here

    return total;
  }

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

  protected Mana manaPaid = new Mana();
  protected int multiplier;

  public VariableManaCost() {
    this(1);
    options.add(new Mana());
  }
View Full Code Here

  @Override
  public abstract T copy();

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

    }

    @Override
    public Mana getNetMana(Game game) {
      if (game == null)
        return new Mana();
      return Mana.GreenMana(game.getBattlefield().countAll(filter, controllerId));
    }
View Full Code Here

  }

  class ElvishArchdruidEffect extends ManaEffect {

    public ElvishArchdruidEffect() {
      super(new Mana());
    }
View Full Code Here

  }

  @Override
  public Mana getNetMana(Game game) {
    if (game == null)
      return new Mana();
    return Mana.ColorlessMana(game.getPermanent(this.getSourceId()).getCounters().getCount("charge"));
  }
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.