Tabnine Logo
OpponentsLostLifeCount
Code IndexAdd Tabnine to your IDE (free)

How to use
OpponentsLostLifeCount
in
mage.abilities.dynamicvalue.common

Best Java code snippets using mage.abilities.dynamicvalue.common.OpponentsLostLifeCount (Showing top 7 results out of 315)

origin: magefree/mage

@Override
public boolean apply(Game game, Ability source, Ability abilityToModify) {
  Ability spellAbility = abilityToModify;
  if (spellAbility != null) {
    OpponentsLostLifeCount dynamicValue = new OpponentsLostLifeCount();
    int amount = dynamicValue.calculate(game, source, this);
    if (amount > 0) {
      CardUtil.reduceCost(spellAbility, amount);
      return true;
    }
  }
  return false;
}
origin: magefree/mage

@Override
public OpponentsLostLifeCount copy() {
  return new OpponentsLostLifeCount();
}
origin: magefree/mage

@Override
public int calculate(Game game, Ability sourceAbility, Effect effect) {
  return this.calculate(game, sourceAbility.getControllerId());
}
origin: magefree/mage

@Override
public Mana produceMana(boolean netMana, Game game, Ability source) {
  return Mana.RedMana(new OpponentsLostLifeCount().calculate(game, source, this));
}
origin: magefree/mage

  @Override
  public boolean applies(GameEvent event, Ability source, Game game) {
    if (event.getSourceId().equals(source.getSourceId())) {
      if (new OpponentsLostLifeCount().calculate(game, source, this) == 0) {
        return true;
      }
    }
    return false;
  }
}
origin: magefree/mage

@Override
public boolean apply(Game game, Ability source) {
  Permanent permanent = game.getPermanentEntering(source.getSourceId());
  if (permanent != null) {
    int oll = new OpponentsLostLifeCount().calculate(game, source, this);
    if (oll > 0) {
      permanent.addCounters(CounterType.P1P1.createInstance(oll), source, game);
    }
    return true;
  }
  return false;
}
origin: magefree/mage

@Override
public boolean apply(Game game, Ability source) {
  Permanent permanent = game.getPermanentEntering(source.getSourceId());
  if (permanent != null) {
    int oll = new OpponentsLostLifeCount().calculate(game, source, this);
    if (oll > 0) {
      permanent.addCounters(CounterType.P1P1.createInstance(oll), source, game);
    }
    return true;
  }
  return false;
}
mage.abilities.dynamicvalue.commonOpponentsLostLifeCount

Most used methods

  • <init>
  • calculate

Popular in Java

  • Start an intent from android
  • compareTo (BigDecimal)
  • getSupportFragmentManager (FragmentActivity)
  • setScale (BigDecimal)
  • Kernel (java.awt.image)
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • JButton (javax.swing)
  • JFrame (javax.swing)
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now