Codota Logo
mage.abilities.costs.mana
Code IndexAdd Codota to your IDE (free)

How to use mage.abilities.costs.mana

Best Java code snippets using mage.abilities.costs.mana (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
SimpleDateFormat s =
  • Codota IconString pattern;new SimpleDateFormat(pattern)
  • Codota IconString template;Locale locale;new SimpleDateFormat(template, locale)
  • Codota Iconnew SimpleDateFormat()
  • Smart code suggestions by Codota
}
origin: magefree/mage

@Override
public ManaCosts<T> getUnpaid() {
  ManaCosts<T> unpaid = new ManaCostsImpl<>();
  for (T cost : this) {
    if (!(cost instanceof VariableManaCost) && !cost.isPaid()) {
      unpaid.add((T) cost.getUnpaid());
    }
  }
  return unpaid;
}
origin: magefree/mage

public ManaCostsImpl(final ManaCostsImpl<T> costs) {
  this.id = costs.id;
  for (T cost : costs) {
    this.add(cost.copy());
  }
}
origin: magefree/mage

@Override
public boolean testPay(Mana testMana) {
  for (ManaCost cost : this) {
    if (cost.testPay(testMana)) {
      return true;
    }
  }
  return false;
}
origin: magefree/mage

@Override
public int getConvertedManaCost() {
  if (manaCost != null) {
    return manaCost.convertedManaCost();
  }
  return 0;
}
origin: magefree/mage

@Override
public void addManaCost(ManaCost cost) {
  if (cost != null) {
    this.manaCosts.add(cost);
    this.manaCostsToPay.add(cost);
  }
}
origin: magefree/mage

public MadnessCastEffect(ManaCosts<ManaCost> madnessCost) {
  super(Outcome.Benefit);
  this.madnessCost = madnessCost;
  staticText = "you may cast it by paying " + madnessCost.getText() + " instead of putting it into your graveyard";
}
origin: magefree/mage

@Override
public void setPaid() {
  for (T cost : this) {
    cost.setPaid();
  }
}
origin: magefree/mage

@Override
public void assignPayment(Game game, Ability ability, ManaPool pool, Cost costToPay) {
  if (!assignColored(ability, game, pool, mana, costToPay)) {
    assignGeneric(ability, game, pool, mana2, costToPay);
  }
}
origin: magefree/mage

  @Override
  public boolean containsColor(ColoredManaSymbol coloredManaSymbol) {
    for (ManaCost manaCost : this) {
      if (manaCost.containsColor(coloredManaSymbol)) {
        return true;
      }
    }
    return false;
  }
}
origin: magefree/mage

@Override
public boolean isPaid() {
  if (paid || isColoredPaid(this.mana)) {
    return true;
  }
  return isColorlessPaid(this.mana2);
}
origin: magefree/mage

LicidEffect(ManaCost specialActionCost) {
  super(Outcome.Neutral);
  this.specialActionCost = specialActionCost;
  this.staticText = "{this} loses this ability and becomes an Aura enchantment with enchant creature. Attach it to target creature. You may pay " + specialActionCost.getText() + " to end this effect";
}
origin: magefree/mage

@Override
public void setSourceFilter(Filter filter) {
  for (T cost : this) {
    cost.setSourceFilter(filter);
  }
}
origin: magefree/mage

@Override
public void assignPayment(Game game, Ability ability, ManaPool pool, Cost costToPay) {
  if (assignColored(ability, game, pool, this.mana1, costToPay)) {
    return;
  }
  assignColored(ability, game, pool, this.mana2, costToPay);
}
origin: magefree/mage

@Override
public Filter getSourceFilter() {
  for (T cost : this) {
    if (cost.getSourceFilter() != null) {
      return cost.getSourceFilter();
    }
  }
  return null;
}
origin: magefree/mage

@Override
public boolean isPaid() {
  if (paid) {
    return true;
  }
  return this.isColorlessPaid(mana);
}
origin: magefree/mage

@Override
public boolean canPay(Ability ability, UUID sourceId, UUID controllerId, Game game) {
  for (T cost : this) {
    if (!cost.canPay(ability, sourceId, controllerId, game)) {
      return false;
    }
  }
  return true;
}
origin: magefree/mage

@Override
public boolean isPaid() {
  if (paid) {
    return true;
  }
  return this.isColoredPaid(mana);
}
origin: magefree/mage

@Override
public int convertedManaCost() {
  int total = 0;
  for (ManaCost cost : this) {
    total += cost.convertedManaCost();
  }
  return total;
}
origin: magefree/mage

@Override
public ManaCosts<T> getUnpaidVariableCosts() {
  ManaCosts<T> unpaid = new ManaCostsImpl<>();
  for (ManaCost cost : this) {
    if (cost instanceof VariableManaCost && !cost.isPaid()) {
      unpaid.add((T) cost.getUnpaid());
    }
  }
  return unpaid;
}
origin: magefree/mage

public PactEffect(ManaCosts cost) {
  super(Outcome.Neutral);
  this.cost = cost;
  staticText = "pay " + cost.getText() + ". If you don't, you lose the game";
}
mage.abilities.costs.mana

Most used classes

  • ManaCosts
  • ManaCost
  • GenericManaCost
  • ManaCostsImpl
  • VariableManaCost
  • MonoHybridManaCost,
  • PhyrexianManaCost,
  • AlternateManaPaymentAbility,
  • ColorlessManaCost,
  • HybridManaCost,
  • ManaCostImpl,
  • ManaSymbols,
  • SnowManaCost
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now