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

How to use
moveCards
method
in
mage.players.Player

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

origin: magefree/mage

  @Override
  public void doOpeningHandAction(Card card, Player player, Game game) {
    player.moveCards(card, Zone.BATTLEFIELD, this, game);
  }
}
origin: magefree/mage

@Override
public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana, Cost costToPay) {
  Permanent permanent = game.getPermanent(sourceId);
  Player controller = game.getPlayer(controllerId);
  if (permanent == null || controller == null) {
    return false;
  }
  controller.moveCards(permanent, Zone.HAND, ability, game);
  paid = true;
  return paid;
}
origin: magefree/mage

@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
  Player controller = game.getPlayer(source.getControllerId());
  if (controller != null) {
    Permanent permanent = ((ZoneChangeEvent) event).getTarget();
    if (permanent != null) {
      controller.moveCards(permanent, Zone.HAND, source, game);
      return true;
    }
  }
  return false;
}
origin: magefree/mage

@Override
public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana, Cost costToPay) {
  Player controller = game.getPlayer(controllerId);
  if (controller != null) {
    controller.moveCards(controller.getLibrary().getTopCards(game, amount), Zone.EXILED, ability, game);
    paid = true;
  }
  return paid;
}
origin: magefree/mage

  @Override
  public boolean apply(Game game, Ability source) {
    Player player = game.getPlayer(source.getControllerId());
    if (player != null) {
      Set<Card> cards = player.getGraveyard().getCards(filter2orLess, game);
      player.moveCards(cards, Zone.HAND, source, game);
      return true;
    }
    return false;
  }
}
origin: magefree/mage

  @Override
  public boolean apply(Game game, Ability source) {
    Player defender = game.getPlayer(targetPointer.getFirst(game, source));
    if (defender != null) {
      defender.moveCards(defender.getLibrary().getTopCards(game, 20), Zone.EXILED, source, game);
      return true;
    }
    return false;
  }
}
origin: magefree/mage

@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
  Player player = game.getPlayer(event.getTargetId());
  if (player != null) {
    return player.moveCards(player.getLibrary().getTopCards(game, event.getAmount()), Zone.GRAVEYARD, source, game);
  }
  return true;
}
origin: magefree/mage

@Override
public boolean apply(Game game, Ability source) {
  Player player = game.getPlayer(targetPointer.getFirst(game, source));
  if (player != null) {
    player.moveCards(player.getLibrary().getTopCards(game, numberCards.calculate(game, source, this)), Zone.GRAVEYARD, source, game);
    return true;
  }
  return false;
}
origin: magefree/mage

@Override
public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana, Cost costToPay) {
  Player player = game.getPlayer(controllerId);
  if (player != null && player.getLibrary().size() >= numberOfCards) {
    paid = true;
    this.cardsMovedToGraveyard.addAll(player.getLibrary().getTopCards(game, numberOfCards));
    player.moveCards(player.getLibrary().getTopCards(game, numberOfCards), Zone.GRAVEYARD, ability, game);
  }
  return paid;
}
origin: magefree/mage

@Override
public boolean apply(Game game, Ability source) {
  for (UUID opponentId : game.getOpponents(source.getControllerId())) {
    Player opponent = game.getPlayer(opponentId);
    if (opponent != null) {
      opponent.moveCards(opponent.getLibrary().getTopCards(game, 7), Zone.GRAVEYARD, source, game);
    }
  }
  return true;
}
origin: magefree/mage

@Override
public boolean apply(Game game, Ability source) {
  Player controller = game.getPlayer(source.getControllerId());
  if (controller != null) {
    Card spellCard = game.getStack().getSpell(source.getSourceId()).getCard();
    controller.moveCards(spellCard, Zone.HAND, source, game);
    return true;
  }
  return false;
}
origin: magefree/mage

@Override
public boolean apply(Game game, Ability source) {
  Player controller = game.getPlayer(source.getControllerId());
  if (controller != null) {
    UUID exileId = source.getSourceId();
    ExileZone exileZone = game.getExile().getExileZone(exileId);
    if (exileZone != null) {
      return controller.moveCards(exileZone.getCards(game), Zone.GRAVEYARD, source, game);
    }
  }
  return false;
}
origin: magefree/mage

@Override
public boolean apply(Game game, Ability source) {
  Player controller = game.getPlayer(source.getControllerId());
  if (controller == null) {
    return false;
  }
  if (controller.searchLibrary(target, game)) {
    controller.moveCards(game.getCard(target.getFirstTarget()), Zone.GRAVEYARD, source, game);
  }
  controller.shuffleLibrary(source, game);
  return true;
}

origin: magefree/mage

@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
  Player controller = game.getPlayer(source.getControllerId());
  if (controller != null) {
    Card card = game.getExile().getExileZone(CardUtil.getCardExileZoneId(game, source)).getRandom(game);
    if (card != null) {
      controller.moveCards(card, Zone.HAND, source, game);
    }
  }
  return true;
}
origin: magefree/mage

  @Override
  public boolean apply(Game game, Ability source) {
    Player controller = game.getPlayer(source.getControllerId());
    if (controller != null) {
      controller.moveCards(new CardsImpl(this.getTargetPointer().getTargets(game, source)), Zone.LIBRARY, source, game);
      controller.shuffleLibrary(source, game);
      return true;
    }
    return false;
  }
}
origin: magefree/mage

  @Override
  public boolean apply(Game game, Ability source) {
    for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) {
      Player player = game.getPlayer(playerId);
      if (player != null) {
        player.moveCards(player.getGraveyard().getCards(StaticFilters.FILTER_CARD_ARTIFACT, game), Zone.BATTLEFIELD, source, game);
      }
    }
    return true;
  }
}
origin: magefree/mage

@Override
public boolean apply(Game game, Ability source) {
  Player player = game.getPlayer(source.getFirstTarget());
  if (player != null) {
    int amount = player.getLibrary().size() / 2;
    return player.moveCards(player.getLibrary().getTopCards(game, amount), Zone.GRAVEYARD, source, game);
  }
  return false;
}
origin: magefree/mage

@Override
public boolean apply(Game game, Ability source) {
  Player controller = game.getPlayer(source.getControllerId());
  if (controller != null) {
    if (controller.searchLibrary(target, game)) {
      controller.moveCards(new CardsImpl(target.getTargets()), Zone.GRAVEYARD, source, game);
    }
    controller.shuffleLibrary(source, game);
    return true;
  }
  return false;
}

origin: magefree/mage

  @Override
  public boolean apply(Game game, Ability source) {
    Player sourcePlayer = game.getPlayer(source.getControllerId());
    for (UUID playerId : game.getState().getPlayersInRange(sourcePlayer.getId(), game)) {
      Player player = game.getPlayer(playerId);
      if (player != null) {
        player.moveCards(player.getLibrary().getTopCards(game, 5), Zone.GRAVEYARD, source, game);
      }
    }
    return true;
  }
}
origin: magefree/mage

@Override
public boolean apply(Game game, Ability source) {
  Player controller = game.getPlayer(source.getControllerId());
  if (controller != null) {
    TargetCard target = new TargetCardInHand(0, 2, new FilterLandCard("up to two land cards to put onto the battlefield tapped"));
    controller.chooseTarget(outcome, controller.getHand(), target, source, game);
    return controller.moveCards(new CardsImpl(target.getTargets()).getCards(game),
        Zone.BATTLEFIELD, source, game, true, false, false, null);
  }
  return false;
}
mage.playersPlayermoveCards

Javadoc

Universal method to move cards from one zone to another. Do not mix objects from different from zones to move.

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

  • Updating database using SQL prepared statement
  • getContentResolver (Context)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • scheduleAtFixedRate (ScheduledExecutorService)
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • 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