Package mage.target.common

Examples of mage.target.common.TargetCardInLibrary


        //Destroy target land;
        this.getSpellAbility().addEffect(new DestroyTargetEffect());
        this.getSpellAbility().addTarget(new TargetLandPermanent());
        //or search your library for a land card, put that card onto the battlefield, then shuffle your library.
        Mode mode = new Mode();
        mode.getEffects().add(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(new FilterLandCard())));
        this.getSpellAbility().getModes().addMode(mode);

        // Entwine {1}{G}
        this.addAbility(new EntwineAbility("{1}{G}"));
    }
View Full Code Here


    @Override
    public boolean apply(Game game, Ability source) {
        Player player = game.getPlayer(source.getControllerId());
        if (player != null) {
            TargetCardInLibrary target = new TargetCardInLibrary(new FilterBasicLandCard());
            if (player.searchLibrary(target, game)) {
                Cards cards = new CardsImpl();
                Card card = player.getLibrary().getCard(target.getFirstTarget(), game);
                if (card != null) {
                    cards.add(card);
                    if (MorbidCondition.getInstance().apply(game, source)
                            && player.chooseUse(Outcome.PutLandInPlay, "Do you wish to put the card onto the battlefield instead?", game)) {
                        card.putOntoBattlefield(game, Zone.HAND, source.getSourceId(), source.getControllerId());
View Full Code Here

        this.expansionSetCode = "PTK";

        this.color.setGreen(true);

        // Search your library for a Forest card and put that card onto the battlefield. Then shuffle your library.
        this.getSpellAbility().addEffect(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(filter)));
               
    }
View Full Code Here

        this.power = new MageInt(0);
        this.toughness = new MageInt(3);

        // {1}{G}, {T}, Sacrifice Embodiment of Spring: Search your library for a basic land card, put it onto the battlefield tapped, then shuffle your library.
        SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
                new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(new FilterBasicLandCard()), true),
                new ManaCostsImpl("{1}{G}"));
        ability.addCost(new TapSourceCost());
        ability.addCost(new SacrificeSourceCost());
        this.addAbility(ability);
    }
View Full Code Here

        this.expansionSetCode = "JUD";

        this.color.setBlue(true);

        // Search target player's library for up to three cards with flashback and put them into that player's graveyard. Then the player shuffles his or her library.
        TargetCardInLibrary target = new TargetCardInLibrary(0, 3, filterCard);
        this.getSpellAbility().addEffect(new SearchLibraryPutInGraveEffect(target));
        this.getSpellAbility().addTarget(new TargetPlayer());
    }
View Full Code Here

class TransmuteArtifactEffect extends SearchEffect {


    public TransmuteArtifactEffect() {
        super(new TargetCardInLibrary(new FilterArtifactCard()), Outcome.PutCardInPlay);
        staticText = "Sacrifice an artifact. If you do, search your library for an artifact card. If that card's converted mana cost is less than or equal to the sacrificed artifact's converted mana cost, put it onto the battlefield. If it's greater, you may pay {X}, where X is the difference. If you do, put it onto the battlefield. If you don't, put it into its owner's graveyard. Then shuffle your library";
    }
View Full Code Here

    public TerramorphicExpanseAbility() {
        super(Zone.BATTLEFIELD, null);
        addCost(new TapSourceCost());
        addCost(new SacrificeSourceCost());
        TargetCardInLibrary target = new TargetCardInLibrary(new FilterBasicLandCard());
        addEffect(new SearchLibraryPutInPlayEffect(target, true, Outcome.PutLandInPlay));
    }
View Full Code Here

                // cards in Library
                cardsCount = cardsInLibrary.count(filter, game);
                if (cardsCount > 0) {
                    filter.setMessage("card named " + card.getName() + " in the library of " + targetPlayer.getName());
                    TargetCardInLibrary target = new TargetCardInLibrary(0, cardsCount, filter);
                    if (player.searchLibrary(target, game, targetPlayer.getId())) {
                        List<UUID> targets = target.getTargets();
                        for (UUID targetId : targets) {
                            Card targetCard = targetPlayer.getLibrary().getCard(targetId, game);
                            if (targetCard != null) {
                                player.moveCardToExileWithInfo(targetCard, null, "", source.getSourceId(), game, Zone.LIBRARY);                               
                            }
View Full Code Here

    public DiabolicTutor(UUID ownerId){
        super(ownerId, 135, "Diabolic Tutor", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY},"{2}{B}{B}");
        this.expansionSetCode = "10E";
        this.color.setBlack(true);
        TargetCardInLibrary target = new TargetCardInLibrary();
        this.getSpellAbility().addEffect(new SearchLibraryPutInHandEffect(target));
    }
View Full Code Here

        this.toughness = new MageInt(4);

        // Flying
        this.addAbility(FlyingAbility.getInstance());
        // Whenever Zur the Enchanter attacks, you may search your library for an enchantment card with converted mana cost 3 or less and put it onto the battlefield. If you do, shuffle your library.
        this.addAbility(new AttacksTriggeredAbility(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(filter), false), true));
    }
View Full Code Here

TOP

Related Classes of mage.target.common.TargetCardInLibrary

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.