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

How to use
init
method
in
mage.abilities.effects.common.continuous.GainControlTargetEffect

Best Java code snippets using mage.abilities.effects.common.continuous.GainControlTargetEffect.init (Showing top 3 results out of 315)

origin: magefree/mage

@Override
public void init(Ability source, Game game) {
  super.init(source, game);
  // save target id to be available for hidden state based triggered effect
  game.getState().setValue("target" + source.getSourceId(), getTargetPointer().getFirst(game, source));
}
origin: magefree/mage

@Override
public void init(Ability source, Game game) {
  Player controller = game.getPlayer(source.getControllerId());
  if (controller != null) {
    int maxToughness = 2;
    ManaCosts manaCosts = source.getManaCostsToPay();
    if (!manaCosts.getVariableCosts().isEmpty()) {
      maxToughness = source.getManaCostsToPay().getX();
    }
    Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source));
    if (permanent != null && permanent.getToughness().getValue() > maxToughness) {
      this.discard();
      return;
    }
  }
  super.init(source, game);
}
origin: magefree/mage

  super.controllingPlayerId = winner.getId();
super.init(source, game);
mage.abilities.effects.common.continuousGainControlTargetEffectinit

Popular methods of GainControlTargetEffect

  • <init>
  • discard
  • getTargetPointer
  • setTargetPointer
  • setText

Popular in Java

  • Reactive rest calls using spring rest template
  • addToBackStack (FragmentTransaction)
  • getContentResolver (Context)
  • getResourceAsStream (ClassLoader)
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Top 12 Jupyter Notebook extensions
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