congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
Player.hasDesignation
Code IndexAdd Tabnine to your IDE (free)

How to use
hasDesignation
method
in
mage.players.Player

Best Java code snippets using mage.players.Player.hasDesignation (Showing top 3 results out of 315)

origin: magefree/mage

@Override
public boolean apply(Game game, Ability source) {
  return game.getPlayer(source.getControllerId()).hasDesignation(DesignationType.CITYS_BLESSING);
}
origin: magefree/mage

  @Override
  public boolean apply(Game game, Ability source) {
    Player controller = game.getPlayer(source.getControllerId());
    if (controller != null) {
      Permanent targetPermanent = game.getPermanent(getTargetPointer().getFirst(game, source));
      if (targetPermanent != null) {
        if (controller.hasDesignation(DesignationType.CITYS_BLESSING)
            && controller.chooseUse(outcome, "Put " + targetPermanent.getIdName() + " on top of its owner's library instead?", source, game)) {
          controller.moveCards(targetPermanent, Zone.LIBRARY, source, game);
        } else {
          controller.moveCards(targetPermanent, Zone.HAND, source, game);
        }

      }
      return true;
    }
    return false;
  }
}
origin: magefree/mage

public static boolean checkAscend(Game game, Ability source, boolean verbose) {
  Player controller = game.getPlayer(source.getControllerId());
  if (controller != null) {
    if (!controller.hasDesignation(DesignationType.CITYS_BLESSING)) {
      if (game.getBattlefield().countAll(StaticFilters.FILTER_PERMANENT, controller.getId(), game) > 9) {
        controller.addDesignation(new CitysBlessing());
        game.informPlayers(controller.getLogName() + " gets the city's blessing for the rest of the game.");
      } else {
        if (verbose) {
          game.informPlayers(controller.getLogName() + " does not get the city's blessing.");
        }
      }
    } else {
      if (verbose) {
        game.informPlayers(controller.getLogName() + " already has the city's blessing.");
      }
    }
    return true;
  }
  return false;
}
mage.playersPlayerhasDesignation

Popular methods of Player

  • getId
  • getHand
  • getName
  • getLife
  • getLibrary
  • hasLeft
  • hasWon
  • getCounters
  • hasLost
  • copy
  • damage
  • declareAttacker
  • damage,
  • declareAttacker,
  • getGraveyard,
  • getPlayersUnderYourControl,
  • activateAbility,
  • canLose,
  • choose,
  • declareBlocker,
  • gainLife,
  • getAttachments

Popular in Java

  • Start an intent from android
  • onRequestPermissionsResult (Fragment)
  • scheduleAtFixedRate (Timer)
  • setContentView (Activity)
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • Option (scala)
  • Top 17 PhpStorm Plugins
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