congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Player.removeFromGraveyard
Code IndexAdd Tabnine to your IDE (free)

How to use
removeFromGraveyard
method
in
mage.players.Player

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

origin: magefree/mage

@Override
public boolean apply(Game game, Ability source) {
  Player controller = game.getPlayer(source.getControllerId());
  Card card = (Card)game.getObject(source.getFirstTarget());
  if (controller != null && card != null && controller.removeFromGraveyard(card, game)) {
    controller.moveCards(card, Zone.HAND, source, game);
    if (!card.isLand()) {
      int damage = card.getConvertedManaCost();                
      Permanent permanent = game.getPermanent(source.getTargets().get(1).getFirstTarget());
      if (permanent != null) {
        permanent.damage(damage, source.getSourceId(), game, false, true);
      }
      Player targetPlayer = game.getPlayer(source.getTargets().get(1).getFirstTarget());
      if (targetPlayer != null) {
        targetPlayer.damage(damage, source.getSourceId(), game, false, true);
      }
    }
    return true;
  }
  return false;
}
origin: magefree/mage

switch (fromZone) {
  case GRAVEYARD:
    removed = game.getPlayer(ownerId).removeFromGraveyard(this, game);
    break;
  case HAND:
mage.playersPlayerremoveFromGraveyard

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
  • onCreateOptionsMenu (Activity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • startActivity (Activity)
  • Menu (java.awt)
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • Table (org.hibernate.mapping)
    A relational table
  • Top PhpStorm plugins
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