congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
ReplacementEffectImpl.init
Code IndexAdd Tabnine to your IDE (free)

How to use
init
method
in
mage.abilities.effects.ReplacementEffectImpl

Best Java code snippets using mage.abilities.effects.ReplacementEffectImpl.init (Showing top 7 results out of 315)

origin: magefree/mage

@Override
public void init(Ability source, Game game) {
  super.init(source, game);
  if (commanderId == null) {
    throw new IllegalArgumentException("commanderId has to be set");
  }
}
origin: magefree/mage

@Override
public void init(Ability source, Game game) {
  super.init(source, game);
  if (amountToPreventDynamic != null) {
    amountToPrevent = amountToPreventDynamic.calculate(game, source, this);
  }
}
origin: magefree/mage

@Override
public void init(Ability source, Game game) {
  this.damageSource.choose(Outcome.PreventDamage, source.getControllerId(), source.getSourceId(), game);
  super.init(source, game);
}
origin: magefree/mage

@Override
public void init(Ability source, Game game) {
  this.target.choose(Outcome.PreventDamage, source.getControllerId(), source.getSourceId(), game);
  super.init(source, game);
}
origin: magefree/mage

@Override
public void init(Ability source, Game game) {
  this.wonFlip = game.getPlayer(source.getControllerId()).flipCoin(source, game, true);
  super.init(source, game);
}
origin: magefree/mage

@Override
public void init(Ability source, Game game) {
  super.init(source, game);
  if (baseCondition instanceof LockedInCondition) {
    condition = new FixedCondition(((LockedInCondition) baseCondition).getBaseCondition().apply(game, source));
  } else {
    condition = baseCondition;
  }
  effect.setTargetPointer(this.targetPointer);
  effect.init(source, game);
  if (otherwiseEffect != null) {
    otherwiseEffect.setTargetPointer(this.targetPointer);
    otherwiseEffect.init(source, game);
  }
  initDone = true;
}
origin: magefree/mage

@Override
public void init(Ability source, Game game) {
  super.init(source, game);
  Player player = game.getPlayer(getTargetPointer().getFirst(game, source));
  Permanent mageObject = game.getPermanentOrLKIBattlefield(source.getSourceId());
  if (player != null && mageObject != null) {
    ChoiceColor choice = new ChoiceColor();
    if (!player.choose(outcome, choice, game)) {
      discard();
      return;
    }
    if (!game.isSimulation()) {
      game.informPlayers(mageObject.getLogName() + ": " + player.getLogName() + " has chosen " + choice.getChoice());
    }
    game.getState().setValue(mageObject.getId() + "_color", choice.getColor());
    mageObject.addInfo("chosen color", CardUtil.addToolTipMarkTags("Chosen color: " + choice.getChoice()), game);
  }
}
mage.abilities.effectsReplacementEffectImplinit

Popular methods of ReplacementEffectImpl

    Popular in Java

    • Parsing JSON documents to java classes using gson
    • getExternalFilesDir (Context)
    • requestLocationUpdates (LocationManager)
    • putExtra (Intent)
    • File (java.io)
      An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
    • URL (java.net)
      A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
    • Charset (java.nio.charset)
      A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
    • Collections (java.util)
      This class consists exclusively of static methods that operate on or return collections. It contains
    • Servlet (javax.servlet)
      Defines methods that all servlets must implement. A servlet is a small Java program that runs within
    • Join (org.hibernate.mapping)
    • Top plugins for WebStorm
    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