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

How to use
moveCardToExileWithInfo
method
in
mage.players.Player

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

origin: magefree/mage

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

@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
  Player controller = game.getPlayer(source.getControllerId());
  Card card = game.getCard(this.cardId);
  if (controller != null && card != null) {
    controller.moveCardToExileWithInfo(card, null, "", source.getSourceId(), game, Zone.STACK, true);
    return true;
  }
  return false;
}
origin: magefree/mage

@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
  Player controller = game.getPlayer(source.getControllerId());
  Card card = game.getCard(this.cardId);
  if (controller != null && card != null) {
    controller.moveCardToExileWithInfo(card, null, "", source.getSourceId(), game, Zone.STACK, true);
    return true;
  }
  return false;
}
origin: magefree/mage

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

@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
  Player controller = game.getPlayer(source.getControllerId());
  Card card = game.getCard(this.cardId);
  if (controller != null && card != null) {
    controller.moveCardToExileWithInfo(card, null, "", source.getSourceId(), game, Zone.STACK, true);
    return true;
  }
  return false;
}
origin: magefree/mage

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

@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
  Player controller = game.getPlayer(source.getControllerId());
  Card card = game.getCard(this.cardId);
  if (controller != null && card != null) {
    controller.moveCardToExileWithInfo(card, null, "", source.getSourceId(), game, Zone.STACK, true);
    return true;
  }
  return false;
}
origin: magefree/mage

  private int checkIfNextLibCardIsNonLandAndExile(Player controller, Ability source, Game game) {
    Card card = controller.getLibrary().getFromTop(game);
    if (card != null) {
      controller.moveCardToExileWithInfo(card, null, "", source.getSourceId(), game, Zone.LIBRARY, true);
      return card.isLand() ? 0 : 1;
    }
    return 0;
  }
}
origin: magefree/mage

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

@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
  Permanent permanent = game.getPermanent(source.getFirstTarget());
  Player controller = game.getPlayer(source.getControllerId());
  if (permanent != null && controller != null) {
    controller.moveCardToExileWithInfo(permanent, null, null, source.getSourceId(), game, Zone.BATTLEFIELD, true);
  }
  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.getCard(getTargetPointer().getFirst(game, source));
    if (card != null) {
      controller.moveCardToExileWithInfo(card, null, "", source.getSourceId(), game, Zone.STACK, true);
      return true;
    }
  }
  return false;
}
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.getCard(getTargetPointer().getFirst(game, source));
    if (card != null) {
      controller.moveCardToExileWithInfo(card, null, "", source.getSourceId(), game, Zone.STACK, true);
      return true;
    }
  }
  return false;
}
origin: magefree/mage

@Override
public boolean apply(Game game, Ability source) {
  Player controller = game.getPlayer(source.getControllerId());
  if (controller != null) {
    List<Permanent> permanents = game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game);
    for (Permanent permanent : permanents) {
      controller.moveCardToExileWithInfo(permanent, exileId, exileZone, source.getSourceId(), game, Zone.BATTLEFIELD, true);
    }
    return true;
  }
  return false;
}
origin: magefree/mage

  @Override
  public boolean apply(Game game, Ability source) {
    Player controller = game.getPlayer(source.getControllerId());
    Permanent sourcePermanent = game.getPermanent(source.getSourceId());
    if (controller != null && sourcePermanent != null) {
      controller.moveCardToExileWithInfo(sourcePermanent, null, "", source.getSourceId(), game, Zone.BATTLEFIELD, true);
      game.addDelayedTriggeredAbility(new AtBeginningNextDeclareAttackersStepNextTurnDelayedTriggeredAbility(), source);
      return true;
    }
    return false;
  }
}
origin: magefree/mage

  @Override
  public boolean apply(Game game, Ability source) {
    Player player = game.getPlayer(source.getControllerId());
    Card card = game.getCard(this.getTargetPointer().getFirst(game, source));
    if (player != null && card != null) {
      if (player.moveCardToExileWithInfo(card, null, "", source.getSourceId(), game, Zone.GRAVEYARD, true)) {
        player.gainLife(1, game, source);
      }
      return true;
    }
    return false;
  }
}
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.getCard(event.getTargetId());
    if (card != null) {
      return controller.moveCardToExileWithInfo(card, null, "", source.getSourceId(), game, game.getState().getZone(card.getId()), true);
    }
  }
  return false;
}
origin: magefree/mage

@Override
public boolean apply(Game game, Ability source) {
  Permanent sourcePermanent = game.getPermanent(source.getSourceId());
  Permanent targetPermanent = game.getPermanent(targetPointer.getFirst(game, source));
  Player controller = game.getPlayer(source.getControllerId());
  if (controller != null && sourcePermanent != null && targetPermanent != null) {
    controller.moveCardToExileWithInfo(targetPermanent, getId(), sourcePermanent.getIdName(), source.getSourceId(), game, Zone.BATTLEFIELD, true);
    sourcePermanent.imprint(targetPermanent.getId(), game);
  }
  return true;
}
origin: magefree/mage

  @Override
  public boolean apply(Game game, Ability source) {
    Permanent creature = game.getPermanent(this.getTargetPointer().getFirst(game, source));
    Player controller = game.getPlayer(source.getControllerId());
    Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId());
    if (creature != null && controller != null && sourcePermanent != null) {
      UUID exileId = CardUtil.getCardExileZoneId(game, source);
      controller.moveCardToExileWithInfo(creature, exileId,
          sourcePermanent.getIdName() + " (" + sourcePermanent.getZoneChangeCounter(game) + ')', source.getSourceId(), game, Zone.BATTLEFIELD, true);

    }
    return false;
  }
}
origin: magefree/mage

  @Override
  public boolean apply(Game game, Ability source) {
    Player controller = game.getPlayer(source.getControllerId());
    if (controller != null) {
      Card card = game.getCard(targetPointer.getFirst(game, source));
      if (card != null && game.getState().getZone(card.getId()) == Zone.GRAVEYARD && controller.moveCardToExileWithInfo(card, null, "", source.getSourceId(), game, Zone.GRAVEYARD, true)) {
        ZombieToken zombie = new ZombieToken();
        return zombie.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId());
      }
      return true;
    }
    return false;
  }
}
origin: magefree/mage

  @Override
  public boolean apply(Game game, Ability source) {
    Player controller = game.getPlayer(source.getControllerId());
    Player playerTargetLibrary = game.getPlayer(getTargetPointer().getFirst(game, source));
    Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId());
    if (controller != null && playerTargetLibrary != null && sourcePermanent != null) {
      UUID exileId = CardUtil.getCardExileZoneId(game, source);
      controller.moveCardToExileWithInfo(playerTargetLibrary.getLibrary().getFromTop(game), exileId,
          sourcePermanent.getIdName() + " (" + sourcePermanent.getZoneChangeCounter(game) + ')', source.getSourceId(), game, Zone.BATTLEFIELD, true);
      return true;
    }
    return false;
  }
}
mage.playersPlayermoveCardToExileWithInfo

Javadoc

Uses card.moveToExile and posts a inform message about moving the card to exile into the game log. Don't use this in replacement effects, because list of applied effects is not saved

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
  • Sublime Text for Python
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