congrats Icon
New! Announcing our next generation AI code completions
Read here
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

    • Reactive rest calls using spring rest template
    • requestLocationUpdates (LocationManager)
    • setContentView (Activity)
    • getApplicationContext (Context)
    • BufferedImage (java.awt.image)
      The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
    • DecimalFormat (java.text)
      A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
    • Collections (java.util)
      This class consists exclusively of static methods that operate on or return collections. It contains
    • HashMap (java.util)
      HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
    • ImageIO (javax.imageio)
    • JOptionPane (javax.swing)
    • Top plugins for WebStorm
    Tabnine Logo
    • Products

      Search for Java codeSearch for JavaScript code
    • IDE Plugins

      IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
    • Company

      About UsContact UsCareers
    • Resources

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