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

How to use
getTargetPointer
method
in
mage.abilities.effects.common.PutCardFromHandOntoBattlefieldEffect

Best Java code snippets using mage.abilities.effects.common.PutCardFromHandOntoBattlefieldEffect.getTargetPointer (Showing top 1 results out of 315)

origin: magefree/mage

@Override
public boolean apply(Game game, Ability source) {
  Player player;
  if (useTargetController) {
    player = game.getPlayer(getTargetPointer().getFirst(game, source));
  } else {
    player = game.getPlayer(source.getControllerId());
  }
  if (player == null) {
    return false;
  }
  if (player.chooseUse(Outcome.PutCardInPlay, "Put " + filter.getMessage() + " from your hand onto the battlefield?", source, game)) {
    TargetCardInHand target = new TargetCardInHand(filter);
    if (player.choose(Outcome.PutCardInPlay, target, source.getSourceId(), game)) {
      Card card = game.getCard(target.getFirstTarget());
      if (card != null) {
        return player.moveCards(card, Zone.BATTLEFIELD, source, game, tapped, false, false, null);
      }
    }
  }
  return false;
}
mage.abilities.effects.commonPutCardFromHandOntoBattlefieldEffectgetTargetPointer

Popular methods of PutCardFromHandOntoBattlefieldEffect

  • <init>
  • apply
  • setText

Popular in Java

  • Updating database using SQL prepared statement
  • onCreateOptionsMenu (Activity)
  • scheduleAtFixedRate (Timer)
  • addToBackStack (FragmentTransaction)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Reference (javax.naming)
  • Best plugins for Eclipse
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