Tabnine Logo
PutTopCardOfLibraryIntoGraveControllerEffect
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: magefree/mage

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

public PutTopCardOfLibraryIntoGraveControllerEffect(int numberCards) {
  super(Outcome.Discard);
  this.numberCards = numberCards;
  this.staticText = setText();
}
origin: magefree/mage

  @Override
  public boolean apply(Game game, Ability source) {
    new PutTopCardOfLibraryIntoGraveControllerEffect(7).apply(game, source);
    Player controller = game.getPlayer(source.getControllerId());
    if (controller == null) {
      return false;
    }
    controller.moveCards(controller.getGraveyard().getCards(
        filter, source.getSourceId(), source.getControllerId(), game
    ), Zone.BATTLEFIELD, source, game);
    controller.moveCards(controller.getGraveyard().getCards(
        filter2, source.getSourceId(), source.getControllerId(), game
    ), Zone.BATTLEFIELD, source, game);
    return true;
  }
}
origin: magefree/mage

  @Override
  public boolean apply(Game game, Ability source) {
    Player controller = game.getPlayer(source.getControllerId());
    if (controller == null) {
      return false;
    }
    new PutTopCardOfLibraryIntoGraveControllerEffect(2).apply(game, source);
    TargetCardInYourGraveyard target = new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD);
    target.setNotTarget(true);
    if (target.canChoose(source.getSourceId(), source.getControllerId(), game)
        && controller.chooseUse(outcome, "Return a creature card from your graveyard to hand?", source, game)
        && controller.choose(Outcome.ReturnToHand, target, source.getSourceId(), game)) {
      Card card = game.getCard(target.getFirstTarget());
      if (card != null) {
        controller.moveCards(card, Zone.HAND, source, game);
      }
    }
    return true;
  }
}
origin: magefree/mage

public CrawlingSensation(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}");
  // At the beginning of your upkeep, you may put the top two cards of your library into your graveyard.
  this.addAbility(new OnEventTriggeredAbility(GameEvent.EventType.UPKEEP_STEP_PRE, "beginning of your upkeep", new PutTopCardOfLibraryIntoGraveControllerEffect(2), true));
  // Whenever one or more land cards are put into your graveyard from anywhere for the first time each turn, create a 1/1 green Insect creature token.
  this.addAbility(new CrawlingSensationTriggeredAbility());
}
origin: magefree/mage

public ScreechingSkaab(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}");
  this.subtype.add(SubType.ZOMBIE);
  this.power = new MageInt(2);
  this.toughness = new MageInt(1);
  // When Screeching Skaab enters the battlefield, put the top two cards of your library into your graveyard.
  this.addAbility(new EntersBattlefieldTriggeredAbility(new PutTopCardOfLibraryIntoGraveControllerEffect(2)));
}
origin: magefree/mage

public CephalidAristocrat(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}");
  this.subtype.add(SubType.CEPHALID);
  this.power = new MageInt(3);
  this.toughness = new MageInt(3);
  // Whenever Cephalid Aristocrat becomes the target of a spell or ability, put the top two cards of your library into your graveyard.
  this.addAbility(new BecomesTargetTriggeredAbility(new PutTopCardOfLibraryIntoGraveControllerEffect(2)));
}
origin: magefree/mage

public TolarianSerpent(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}{U}");
  this.subtype.add(SubType.SERPENT);
  this.power = new MageInt(7);
  this.toughness = new MageInt(7);
  // At the beginning of your upkeep, put the top seven cards of your library into your graveyard.
  this.addAbility(new OnEventTriggeredAbility(EventType.UPKEEP_STEP_PRE, 
      "beginning of your upkeep", 
      new PutTopCardOfLibraryIntoGraveControllerEffect(7), false));
}
origin: magefree/mage

public StitchersSupplier(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}");
  this.subtype.add(SubType.ZOMBIE);
  this.power = new MageInt(1);
  this.toughness = new MageInt(1);
  // When Stitcher's Supplier enters the battlefield or dies, put the top three cards of your library into your graveyard.
  this.addAbility(new EntersBattlefieldOrDiesSourceTriggeredAbility(
      new PutTopCardOfLibraryIntoGraveControllerEffect(3), false)
  );
}
origin: magefree/mage

public WailingGhoul(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}");
  this.subtype.add(SubType.ZOMBIE);
  this.power = new MageInt(1);
  this.toughness = new MageInt(3);
  // When Wailing Ghoul enters the battlefield, put the top two cards of your library into your graveyard.
  this.addAbility(new EntersBattlefieldTriggeredAbility(new PutTopCardOfLibraryIntoGraveControllerEffect(2)));
}
origin: magefree/mage

public ForsakenDrifters(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}");
  this.subtype.add(SubType.ZOMBIE);
  this.power = new MageInt(4);
  this.toughness = new MageInt(2);
  // When Forsaken Drifters dies, put the top four cards of your library into your graveyard.
  this.addAbility(new DiesTriggeredAbility(new PutTopCardOfLibraryIntoGraveControllerEffect(4)));
}
origin: magefree/mage

public NecromancersAssistant(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}");
  this.subtype.add(SubType.ZOMBIE);
  this.power = new MageInt(3);
  this.toughness = new MageInt(1);
  // When Necromancer's Assistant enters the battlefield, put the top three cards of your library into your graveyard.
  this.addAbility(new EntersBattlefieldTriggeredAbility(new PutTopCardOfLibraryIntoGraveControllerEffect(3)));
}
origin: magefree/mage

public ArmoredSkaab(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}");
  this.subtype.add(SubType.ZOMBIE);
  this.subtype.add(SubType.WARRIOR);
  this.power = new MageInt(1);
  this.toughness = new MageInt(4);
  // When Armored Skaab enters the battlefield, put the top four cards of your library into your graveyard.
  this.addAbility(new EntersBattlefieldTriggeredAbility(new PutTopCardOfLibraryIntoGraveControllerEffect(4)));
}
origin: magefree/mage

public DeadbridgeChant(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{4}{B}{G}");
  // When Deadbridge Chant enters the battlefield, put the top ten cards of your library into your graveyard.
  this.addAbility(new EntersBattlefieldTriggeredAbility(new PutTopCardOfLibraryIntoGraveControllerEffect(10)));
  // At the beginning of your upkeep, choose a card at random in your graveyard. If it's a creature card, put it onto the battlefield. Otherwise, put it into your hand.
  this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new DeadbridgeChantEffect(), TargetController.YOU, false));
}
origin: magefree/mage

public LaboratoryBrute(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}");
  this.subtype.add(SubType.ZOMBIE);
  this.subtype.add(SubType.HORROR);
  this.power = new MageInt(3);
  this.toughness = new MageInt(3);
  // When Laboratory Brute enters the battlefield, put the top four cards of your library into your graveyard.
  this.addAbility(new EntersBattlefieldTriggeredAbility(new PutTopCardOfLibraryIntoGraveControllerEffect(4)));
}
origin: magefree/mage

public SultaiSkullkeeper(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}");
  this.subtype.add(SubType.NAGA);
  this.subtype.add(SubType.SHAMAN);
  this.power = new MageInt(2);
  this.toughness = new MageInt(1);
  // When Sultai Skullkeeper enters the battlefield, put the top two cards of your library into your graveyard.
  this.addAbility(new EntersBattlefieldTriggeredAbility(new PutTopCardOfLibraryIntoGraveControllerEffect(2)));
}
origin: magefree/mage

public MorgueThrull(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}");
  this.subtype.add(SubType.THRULL);
  this.power = new MageInt(2);
  this.toughness = new MageInt(2);
  // Sacrifice Morgue Thrull: Put the top three cards of your library into your graveyard.
  this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new PutTopCardOfLibraryIntoGraveControllerEffect(3), new SacrificeSourceCost()));
}
origin: magefree/mage

public CrowOfDarkTidings(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}");
  this.subtype.add(SubType.ZOMBIE);
  this.subtype.add(SubType.BIRD);
  this.power = new MageInt(2);
  this.toughness = new MageInt(1);
  // Flying
  this.addAbility(FlyingAbility.getInstance());
  // When Crow of Dark Tidings enters the battlefield or dies, put the top two cards of your library into your graveyard.
  this.addAbility(new EntersBattlefieldOrDiesSourceTriggeredAbility(new PutTopCardOfLibraryIntoGraveControllerEffect(2), false));
}
origin: magefree/mage

public GlowsporeShaman(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}{G}");
  this.subtype.add(SubType.ELF);
  this.subtype.add(SubType.SHAMAN);
  this.power = new MageInt(3);
  this.toughness = new MageInt(1);
  // When Glowspore Shaman enters the battlefield, put the top three cards of your library into your graveyard. You may put a land card from your graveyard on top of your library.
  Ability ability = new EntersBattlefieldTriggeredAbility(
      new PutTopCardOfLibraryIntoGraveControllerEffect(3), false
  );
  ability.addEffect(new GlowsporeShamanEffect());
  this.addAbility(ability);
}
origin: magefree/mage

public SidisiBroodTyrant(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{G}{U}");
  addSuperType(SuperType.LEGENDARY);
  this.subtype.add(SubType.NAGA);
  this.subtype.add(SubType.SHAMAN);
  this.power = new MageInt(3);
  this.toughness = new MageInt(3);
  // Whenever Sidisi, Brood Tyrant enters the battlefield or attacks, put the top three cards of your library into your graveyard.
  this.addAbility(new EntersBattlefieldOrAttacksSourceTriggeredAbility(new PutTopCardOfLibraryIntoGraveControllerEffect(3)));
  // Whenever one or more creature cards are put into your graveyard from your library, create a 2/2 black Zombie creature token.
  this.addAbility(new SidisiBroodTyrantTriggeredAbility());
}
mage.abilities.effects.commonPutTopCardOfLibraryIntoGraveControllerEffect

Most used methods

  • <init>
  • apply
  • setText

Popular in Java

  • Making http requests using okhttp
  • getSupportFragmentManager (FragmentActivity)
  • setContentView (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • String (java.lang)
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • JTable (javax.swing)
  • JTextField (javax.swing)
  • Github Copilot 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