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

How to use
removeFromHand
method
in
mage.players.Player

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

origin: magefree/mage

  @Override
  public boolean apply(Game game, Ability source) {
    Player player = game.getPlayer(source.getControllerId());
    if (player == null) {
      return false;
    }

    player.drawCards(3, game);
    if (!player.getHand().isEmpty()) {
      FilterCard filter = new FilterCard("card from your hand to put on the bottom of your library");
      TargetCard target = new TargetCard(Zone.HAND, filter);

      if (player.choose(Outcome.Detriment, player.getHand(), target, game)) {
        Card card = player.getHand().get(target.getFirstTarget(), game);
        if (card != null) {
          player.removeFromHand(card, game);
          card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, false);
        }
      }
    }
    return true;
  }
}
origin: magefree/mage

  break;
case HAND:
  removed = game.getPlayer(ownerId).removeFromHand(this, game);
  break;
case LIBRARY:
mage.playersPlayerremoveFromHand

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

  • Reading from database using SQL prepared statement
  • getSystemService (Context)
  • putExtra (Intent)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Notification (javax.management)
  • JList (javax.swing)
  • 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