Tabnine Logo
Player.getPlayersUnderYourControl
Code IndexAdd Tabnine to your IDE (free)

How to use
getPlayersUnderYourControl
method
in
mage.players.Player

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

origin: magefree/mage

private void processControlledPlayers(Player player, GameView gameView) {
  if (!player.getPlayersUnderYourControl().isEmpty()) {
    Map<String, SimpleCardsView> handCards = new HashMap<>();
    for (UUID controlledPlayerId : player.getPlayersUnderYourControl()) {
      Player opponent = game.getPlayer(controlledPlayerId);
      handCards.put(opponent.getName(), new SimpleCardsView(opponent.getHand().getCards(game), true));
    }
    gameView.setOpponentHands(handCards);
  }
}
origin: magefree/mage

for (UUID controlled : player.getPlayersUnderYourControl()) {
  if (gameSessions.containsKey(controlled) && game.getPriorityPlayerId().equals(controlled)) {
    cancelTimeout();
origin: magefree/mage

@Override
public void resetControlAfterSpellResolve(UUID topId) {
  // for Word of Command
  Spell spell = getSpellOrLKIStack(topId);
  if (spell != null) {
    if (spell.getCommandedBy() != null) {
      UUID commandedBy = spell.getCommandedBy();
      UUID spellControllerId = null;
      if (commandedBy.equals(spell.getControllerId())) {
        spellControllerId = spell.getSpellAbility().getFirstTarget(); // i.e. resolved spell is Word of Command
      } else {
        spellControllerId = spell.getControllerId(); // i.e. resolved spell is the target opponent's spell
      }
      if (spellControllerId != null) {
        Player turnController = getPlayer(commandedBy);
        if (turnController != null) {
          Player targetPlayer = getPlayer(spellControllerId);
          if (targetPlayer != null) {
            targetPlayer.setGameUnderYourControl(true, false);
            informPlayers(turnController.getLogName() + " lost control over " + targetPlayer.getLogName());
            if (targetPlayer.getTurnControlledBy().equals(turnController.getId())) {
              turnController.getPlayersUnderYourControl().remove(targetPlayer.getId());
            }
          }
        }
      }
      spell.setCommandedBy(null);
    }
  }
}
origin: magefree/mage

this.playersUnderYourControl.addAll(player.getPlayersUnderYourControl());
this.isGameUnderControl = player.isGameUnderControl();
origin: magefree/mage

this.priorityTimeLeft = player.getPriorityTimeLeft();
this.timerActive = (this.hasPriority && player.isGameUnderControl())
    || (player.getPlayersUnderYourControl().contains(state.getPriorityPlayerId()))
    || player.getId().equals(game.getState().getChoosingPlayerId());
origin: magefree/mage

  || createdForPlayer.getPlayersUnderYourControl().contains(priorityPlayer.getId()))) { // player controls active players turn
this.special = !state.getSpecialActions().getControlledBy(priorityPlayer.getId(), priorityPlayer.isInPayManaMode()).isEmpty();
origin: magefree/mage

targetPlayer.setGameUnderYourControl(true, false);
if (!targetPlayer.getTurnControlledBy().equals(controller.getId())) {
  controller.getPlayersUnderYourControl().remove(targetPlayer.getId());
mage.playersPlayergetPlayersUnderYourControl

Javadoc

Returns a set of players which turns under you control. Doesn't include yourself.

Popular methods of Player

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

Popular in Java

  • Reactive rest calls using spring rest template
  • notifyDataSetChanged (ArrayAdapter)
  • onCreateOptionsMenu (Activity)
  • getResourceAsStream (ClassLoader)
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • IsNull (org.hamcrest.core)
    Is the value null?
  • 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