congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
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

  • Making http requests using okhttp
  • onRequestPermissionsResult (Fragment)
  • setScale (BigDecimal)
  • getSystemService (Context)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • Kernel (java.awt.image)
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • JCheckBox (javax.swing)
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • 14 Best Plugins for Eclipse
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