congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
PutTopCardOfLibraryIntoGraveEachPlayerEffect
Code IndexAdd Tabnine to your IDE (free)

How to use
PutTopCardOfLibraryIntoGraveEachPlayerEffect
in
mage.abilities.effects.common

Best Java code snippets using mage.abilities.effects.common.PutTopCardOfLibraryIntoGraveEachPlayerEffect (Showing top 14 results out of 315)

origin: magefree/mage

@Override
public PutTopCardOfLibraryIntoGraveEachPlayerEffect copy() {
  return new PutTopCardOfLibraryIntoGraveEachPlayerEffect(this);
}
origin: magefree/mage

public PutTopCardOfLibraryIntoGraveEachPlayerEffect(DynamicValue numberCards, TargetController targetController) {
  super(Outcome.Discard);
  this.numberCards = numberCards;
  this.targetController = targetController;
  this.staticText = setText();
}
origin: magefree/mage

public ViciousRumors(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{B}");
  // Vicious Rumors deals 1 damage to each opponent. Each opponent discards a card, then puts the top card of their library into their graveyard. You gain 1 life.
  this.getSpellAbility().addEffect(
      new DamagePlayersEffect(1, TargetController.OPPONENT)
  );
  this.getSpellAbility().addEffect(new DiscardEachPlayerEffect(
      new StaticValue(1), false,
      TargetController.OPPONENT
  ));
  this.getSpellAbility().addEffect(
      new PutTopCardOfLibraryIntoGraveEachPlayerEffect(
          1, TargetController.OPPONENT
      ).setText(", then puts the top card of their library "
          + "into their graveyard")
  );
  this.getSpellAbility().addEffect(new GainLifeEffect(1));
}
origin: magefree/mage

@Override
public boolean apply(Game game, Ability source) {
  Player player = game.getPlayer(source.getControllerId());
  if (player != null) {
    switch (targetController) {
      case OPPONENT:
        for (UUID playerId : game.getOpponents(source.getControllerId())) {
          putCardsToGravecard(playerId, source, game);
        }
        break;
      case ANY:
        for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) {
          putCardsToGravecard(playerId, source, game);
        }
        break;
      case NOT_YOU:
        for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) {
          if (!playerId.equals(source.getSourceId())) {
            putCardsToGravecard(playerId, source, game);
          }
        }
        break;
      default:
        throw new UnsupportedOperationException("TargetController type not supported.");
    }
    return true;
  }
  return false;
}
origin: magefree/mage

public AltarOfTheBrood(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}");
  // Whenever another permanent enters the battlefield under your control, each opponent puts the top card of their library into their graveyard.
  this.addAbility(new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD,
      new PutTopCardOfLibraryIntoGraveEachPlayerEffect(1, TargetController.OPPONENT), filter, false, null, true));
}
origin: magefree/mage

public PsychicCorrosion(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}");
  // Whenever you draw a card, each opponent puts the top two cards of their library into their graveyard.
  this.addAbility(new DrawCardControllerTriggeredAbility(
      new PutTopCardOfLibraryIntoGraveEachPlayerEffect(
          2, TargetController.OPPONENT
      ), false
  ));
}
origin: magefree/mage

public SibsigHost(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}");
  this.subtype.add(SubType.ZOMBIE);
  this.power = new MageInt(2);
  this.toughness = new MageInt(6);
  // When Sibsig Host enters the battlefield, each player puts the top three cards of their library into their graveyard.
  this.addAbility(new EntersBattlefieldTriggeredAbility(new PutTopCardOfLibraryIntoGraveEachPlayerEffect(3, TargetController.ANY)));
}
origin: magefree/mage

public ReturnedReveler(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}");
  this.subtype.add(SubType.ZOMBIE);
  this.subtype.add(SubType.SATYR);
  this.power = new MageInt(1);
  this.toughness = new MageInt(3);
  // When Returned Reveler dies, each player puts the top three cards of their library into their graveyard.
  this.addAbility(new DiesTriggeredAbility(new PutTopCardOfLibraryIntoGraveEachPlayerEffect(3, TargetController.ANY)));
}
origin: magefree/mage

public InkDissolver(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}");
  this.subtype.add(SubType.MERFOLK);
  this.subtype.add(SubType.WIZARD);
  this.power = new MageInt(2);
  this.toughness = new MageInt(1);
  // Kinship - At the beginning of your upkeep, you may look at the top card of your library. If it shares a creature type with Ink Dissolver, you may reveal it. 
  // If you do, each opponent puts the top three cards of their library into their graveyard.
  this.addAbility(new KinshipAbility(new PutTopCardOfLibraryIntoGraveEachPlayerEffect(3, TargetController.OPPONENT)));
}
origin: magefree/mage

public Fascination(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{U}{U}");
  // Choose one -
  // * Each player draws X cards.
  this.getSpellAbility().addEffect(new DrawCardAllEffect(ManacostVariableValue.instance));
  
  // * Each player puts the top X cards of their library into their graveyard.
  Mode mode = new Mode();
  mode.addEffect(new PutTopCardOfLibraryIntoGraveEachPlayerEffect(ManacostVariableValue.instance, TargetController.ANY));
  this.getSpellAbility().addMode(mode);
}
origin: magefree/mage

public ManicScribe(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}");
  this.subtype.add(SubType.HUMAN);
  this.subtype.add(SubType.WIZARD);
  this.power = new MageInt(0);
  this.toughness = new MageInt(3);
  // When Manic Scribe enters the battlefield, each opponent puts the top three cards of their library into their graveyard.
  this.addAbility(new EntersBattlefieldTriggeredAbility(new PutTopCardOfLibraryIntoGraveEachPlayerEffect(3, TargetController.OPPONENT), false));
  // <i>Delirium</i> &mdash; At the beginning of each opponent's upkeep, if there are four or more card types among cards in your graveyard,
  // that player puts the top three cards of their library into their graveyard.
  this.addAbility(new ConditionalInterveningIfTriggeredAbility(
      new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new PutTopCardOfLibraryIntoGraveTargetEffect(3), TargetController.OPPONENT, false, true),
      DeliriumCondition.instance,
      "<i>Delirium</i> &mdash; At the beginning of each opponent's upkeep, if there are four or more card types among cards in your graveyard, "
          + "that player puts the top three cards of their library into their graveyard."));
}
origin: magefree/mage

public WindsOfRebuke(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}");
  // Return target nonland permanent to its owner's hand. Each player puts the top two cards of their library into their graveyard.
  getSpellAbility().addTarget(new TargetNonlandPermanent());
  getSpellAbility().addEffect(new ReturnToHandTargetEffect());
  getSpellAbility().addEffect(new PutTopCardOfLibraryIntoGraveEachPlayerEffect(2, TargetController.ANY));
}
origin: magefree/mage

public SirenOfTheSilentSong(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{B}");
  this.subtype.add(SubType.ZOMBIE);
  this.subtype.add(SubType.SIREN);
  this.power = new MageInt(2);
  this.toughness = new MageInt(1);
  // Flying
  this.addAbility(FlyingAbility.getInstance());
  // <i>Inspired</i> &mdash; Whenever Siren of the Silent Song becomes untapped, each opponent discards a card, then puts the top card of their library into their graveyard.
  Ability ability = new InspiredAbility(new DiscardEachPlayerEffect(TargetController.OPPONENT));
  Effect effect = new PutTopCardOfLibraryIntoGraveEachPlayerEffect(1, TargetController.OPPONENT);
  effect.setText(", then puts the top card of their library into their graveyard");
  ability.addEffect(effect);
  this.addAbility(ability);
}
origin: magefree/mage

public NecromasterDragon(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{B}");
  this.subtype.add(SubType.DRAGON);
  this.power = new MageInt(4);
  this.toughness = new MageInt(4);
  // Flying
  this.addAbility(FlyingAbility.getInstance());
  
  // Whenever Necromaster Dragon deals combat damage to a player, you may pay {2}. If you do, create a 2/2 black Zombie creature token and each opponent puts the top two cards of their library into their graveyard
  Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility(
    new DoIfCostPaid(new CreateTokenEffect(new ZombieToken(), 1), new ManaCostsImpl("{2}")), false);
  ability.addEffect(new PutTopCardOfLibraryIntoGraveEachPlayerEffect(2, TargetController.OPPONENT));
  this.addAbility(ability);
}
mage.abilities.effects.commonPutTopCardOfLibraryIntoGraveEachPlayerEffect

Most used methods

  • <init>
  • setText
  • putCardsToGravecard

Popular in Java

  • Making http requests using okhttp
  • putExtra (Intent)
  • addToBackStack (FragmentTransaction)
  • onCreateOptionsMenu (Activity)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • JList (javax.swing)
  • 21 Best IntelliJ Plugins
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