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

How to use
getTurnControlledBy
method
in
mage.players.Player

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

origin: magefree/mage

  public static List<UUID> split(Game game, UUID playerId) {
    List<UUID> players = new ArrayList<>();
    //players.add(playerId); // add original player
    Player player = game.getPlayer(playerId);
    if (player != null && player.getTurnControlledBy() != null) {
      players.add(player.getTurnControlledBy());
    }
    return players;
  }
}
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.isGameUnderControl = player.isGameUnderControl();
this.turnController = player.getTurnControlledBy();
this.turnControllers.clear();
this.turnControllers.addAll(player.getTurnControllers());
origin: magefree/mage

  controller = game.getPlayer(wordOfCommand.getCommandedBy());
} else {
  controller = game.getPlayer(sourceController.getTurnControlledBy());
if (!targetPlayer.getTurnControlledBy().equals(controller.getId())) {
  controller.getPlayersUnderYourControl().remove(targetPlayer.getId());
mage.playersPlayergetTurnControlledBy

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

  • Making http post requests using okhttp
  • onRequestPermissionsResult (Fragment)
  • setContentView (Activity)
  • onCreateOptionsMenu (Activity)
  • Kernel (java.awt.image)
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Top plugins for WebStorm
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