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

How to use
ReplacementEffectImpl
in
mage.abilities.effects

Best Java code snippets using mage.abilities.effects.ReplacementEffectImpl (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.effectsReplacementEffectImpl

Most used methods

  • init

Popular in Java

  • Start an intent from android
  • startActivity (Activity)
  • scheduleAtFixedRate (Timer)
  • addToBackStack (FragmentTransaction)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • CodeWhisperer alternatives
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