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

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

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

origin: magefree/mage

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

@Override
public String getText(Mode mode) {
  return setText(mode, "");
}
origin: magefree/mage

@Override
public boolean apply(Game game, Ability source) {
  Player controller = game.getPlayer(source.getControllerId());
  if (controller == null) {
    return false;
  }
  // take cards from library and look at them
  boolean topCardRevealed = controller.isTopCardRevealed();
  controller.setTopCardRevealed(false);
  Cards cards = new CardsImpl(controller.getLibrary().getTopCards(game, this.numberOfCards.calculate(game, source, this)));
  controller.lookAtCards(source, null, cards, game);
  this.actionWithSelectedCards(cards, game, source);
  this.putCardsBack(source, controller, cards, game);
  controller.setTopCardRevealed(topCardRevealed);
  this.mayShuffle(controller, source, game);
  return true;
}
origin: magefree/mage

public MirrisGuile(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{G}");
  // At the beginning of your upkeep, you may look at the top three cards of your library, then put them back in any order.
  this.addAbility(new BeginningOfUpkeepTriggeredAbility(new LookLibraryControllerEffect(3), TargetController.YOU, true));
}
origin: magefree/mage

public Index(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{U}");
  // Look at the top five cards of your library, then put them back in any order.
  this.getSpellAbility().addEffect(new LookLibraryControllerEffect(5));
}
origin: magefree/mage

public SageOfEpityr(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}");
  this.subtype.add(SubType.HUMAN);
  this.subtype.add(SubType.WIZARD);
  this.power = new MageInt(1);
  this.toughness = new MageInt(1);
  // When Sage of Epityr enters the battlefield, look at the top four cards of your library, then put them back in any order.
  this.addAbility(new EntersBattlefieldTriggeredAbility(new LookLibraryControllerEffect(4)));
}
origin: magefree/mage

public HalimarDepths(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.LAND},null);
      // Halimar Depths enters the battlefield tapped.
      this.addAbility(new EntersBattlefieldTappedAbility());
      // When Halimar Depths enters the battlefield, look at the top three cards of your library, then put them back in any order.
  this.addAbility(new EntersBattlefieldTriggeredAbility(new LookLibraryControllerEffect(3)));
  this.addAbility(new BlueManaAbility());
}
origin: magefree/mage

public AvenFateshaper(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{U}");
  this.subtype.add(SubType.BIRD);
  this.subtype.add(SubType.WIZARD);
  this.power = new MageInt(4);
  this.toughness = new MageInt(5);
  // Flying
  this.addAbility(FlyingAbility.getInstance());
  // When Aven Fateshaper enters the battlefield, look at the top four cards of your library, then put them back in any order.
  this.addAbility(new EntersBattlefieldTriggeredAbility(new LookLibraryControllerEffect(4)));
  // {4}{U}: Look at the top four cards of your library, then put them back in any order.
  this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new LookLibraryControllerEffect(4), new ManaCostsImpl("{4}{U}")));
}
origin: magefree/mage

public SageOwl(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}");
  this.subtype.add(SubType.BIRD);
  this.power = new MageInt(1);
  this.toughness = new MageInt(1);
  this.addAbility(FlyingAbility.getInstance());
  // When Sage Owl enters the battlefield, look at the top four cards of your library, then put them back in any order.
  this.addAbility(new EntersBattlefieldTriggeredAbility(new LookLibraryControllerEffect(4)));
}
origin: magefree/mage

public SpireOwl(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}");
  this.subtype.add(SubType.BIRD);
  this.power = new MageInt(1);
  this.toughness = new MageInt(1);
  // Flying
  this.addAbility(FlyingAbility.getInstance());
  // When Spire Owl enters the battlefield, look at the top four cards of your library, then put them back in any order.
  this.addAbility(new EntersBattlefieldTriggeredAbility(new LookLibraryControllerEffect(4)));
}
origin: magefree/mage

public InkfathomDivers (UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}");
  this.subtype.add(SubType.MERFOLK);
  this.subtype.add(SubType.SOLDIER);
  this.power = new MageInt(3);
  this.toughness = new MageInt(3);
  // Islandwalk
  this.addAbility(new IslandwalkAbility());
  // When Inkfathom Divers enters the battlefield, look at the top four cards of your library, then put them back in any order.
  this.addAbility(new EntersBattlefieldTriggeredAbility(new LookLibraryControllerEffect(4)));
}
origin: magefree/mage

public SageAven(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}");
  this.subtype.add(SubType.BIRD);
  this.subtype.add(SubType.WIZARD);
  this.power = new MageInt(1);
  this.toughness = new MageInt(3);
  // Flying
  this.addAbility(FlyingAbility.getInstance());
  // When Sage Aven enters the battlefield, look at the top four cards of your library, then put them back in any order.
  this.addAbility(new EntersBattlefieldTriggeredAbility(new LookLibraryControllerEffect(4)));
}
origin: magefree/mage

public GiltLeafSeer(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}");
  this.subtype.add(SubType.ELF);
  this.subtype.add(SubType.SHAMAN);
  this.power = new MageInt(2);
  this.toughness = new MageInt(2);
  // {G}, {tap}: Look at the top two cards of your library, then put them back in any order.
  Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new LookLibraryControllerEffect(2), new ManaCostsImpl("{G}"));
  ability.addCost(new TapSourceCost());
  this.addAbility(ability);
}
origin: magefree/mage

public Omen(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{U}");
  // Look at the top three cards of your library, then put them back in any order. You may shuffle your library.
  this.getSpellAbility().addEffect(new LookLibraryControllerEffect(3, true));
  
  // Draw a card.
  this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1));
}
origin: magefree/mage

public Ponder(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{U}");
  // Look at the top three cards of your library, then put them back in any order. You may shuffle your library.
  this.getSpellAbility().addEffect(new LookLibraryControllerEffect(3, true, true));
  // Draw a card.
  this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1));
}
origin: magefree/mage

public CrystalSeer (UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}");
  this.subtype.add(SubType.VEDALKEN);
  this.subtype.add(SubType.WIZARD);
  this.power = new MageInt(2);
  this.toughness = new MageInt(2);
  // When Crystal Seer enters the battlefield, look at the top four cards of your library, then put them back in any order.
  this.addAbility(new EntersBattlefieldTriggeredAbility(new LookLibraryControllerEffect(4)));
  // {4}{U}: Return Crystal Seer to its owner's hand.
  this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true), new ManaCostsImpl("{4}{U}")));
}
origin: magefree/mage

public SenseisDiviningTop(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}");
  this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new LookLibraryControllerEffect(3, false, true), new ManaCostsImpl("{1}")));
  Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new TapSourceCost());
  ability.addEffect(new SenseisDiviningTopEffect());
  this.addAbility(ability);
}
origin: magefree/mage

public CallousDeceiver(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}");
  this.subtype.add(SubType.SPIRIT);
  this.power = new MageInt(1);
  this.toughness = new MageInt(3);
  // {1}: Look at the top card of your library.
  this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new LookLibraryControllerEffect(), new GenericManaCost(1)));
  // {2}: Reveal the top card of your library. If it's a land card, {this} gets +1/+0 and gains flying until end of turn. Activate this ability only once each turn.
  this.addAbility(new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new CallousDeceiverEffect(), new ManaCostsImpl("{2}")));
}
origin: magefree/mage

public BrutalDeceiver(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}");
  this.subtype.add(SubType.SPIRIT);
  this.power = new MageInt(2);
  this.toughness = new MageInt(2);
  // {1}: Look at the top card of your library.
  this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new LookLibraryControllerEffect(), new GenericManaCost(1)));
  // {2}: Reveal the top card of your library. If it's a land card, {this} gets +1/+0 and gains first strike until end of turn.
  this.addAbility(new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new BrutalDeceiverEffect(), new ManaCostsImpl("{2}")));
}
origin: magefree/mage

public HarshDeceiver(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}");
  this.subtype.add(SubType.SPIRIT);
  this.power = new MageInt(1);
  this.toughness = new MageInt(4);
  // {1}: Look at the top card of your library.
  this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new LookLibraryControllerEffect(), new GenericManaCost(1)));
  // {2}: Reveal the top card of your library. If it's a land card, untap {this} and it gets +1/+1 until end of turn.
  this.addAbility(new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new HarshDeceiverEffect(), new ManaCostsImpl("{2}")));
}
mage.abilities.effects.commonLookLibraryControllerEffect

Most used methods

  • <init>
  • actionWithSelectedCards
  • mayShuffle
    Check to shuffle library if allowed
  • putCardsBack
    Put the rest of the cards back to defined zone
  • setText

Popular in Java

  • Reading from database using SQL prepared statement
  • setRequestProperty (URLConnection)
  • requestLocationUpdates (LocationManager)
  • compareTo (BigDecimal)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Top 15 Vim 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