Package mage.filter.common

Examples of mage.filter.common.FilterLandCard


                    card.moveToZone(Zone.HAND, source.getSourceId(), game, false);
                    revealedCards.add(card);
                }
            }

            target = new TargetCard(Zone.PICK, new FilterLandCard("land card to reveal and put into your hand"));
            if (landCardFound && player.choose(Outcome.DrawCard, cards, target, game)) {
                Card card = cards.get(target.getFirstTarget(), game);
                if (card != null) {
                    cards.remove(card);
                    card.moveToZone(Zone.HAND, source.getSourceId(), game, false);
View Full Code Here


        return true;
    }

    private void searchLand(Player player, Ability source, Game game, Cards cards, String subtype) {
        FilterLandCard filter = new FilterLandCard(subtype);
        filter.add(new SubtypePredicate(subtype));
        TargetCardInLibrary target = new TargetCardInLibrary(filter);
        if (player.searchLibrary(target, game)) {
            Card card = player.getLibrary().remove(target.getFirstTarget(), game);
            if (card != null) {
                card.moveToZone(Zone.HAND, source.getSourceId(), game, false);
View Full Code Here

       
        //Whenever Borborygmous Enraged deals combat damage to a player, reveal the top three cards of your library. Put all land cards revealed this way into your hand and the rest into your graveyard.
        this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new BorborygmosEnragedEffect(), false, false));
       
        //Discard a land card: Borborygmos Enraged deals 3 damage to target creature or player
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(3), new DiscardTargetCost(new TargetCardInHand(new FilterLandCard())));
        ability.addTarget(new TargetCreatureOrPlayer());
        this.addAbility(ability);
    }
View Full Code Here

    @Override
    public boolean apply(Game game, Ability source) {
        Player player = game.getPlayer(source.getControllerId());
        if (player == null)
            return false;
        TargetCardInLibrary target = new TargetCardInLibrary(new FilterLandCard());
        if (player.searchLibrary(target, game)) {
            if (target.getTargets().size() > 0) {
                UUID cardId = target.getTargets().get(0);
                Card card = player.getLibrary().remove(cardId, game);
                if (card != null) {
View Full Code Here

        return false;
    }

    private void searchLand(Player player, Ability source, Game game, Cards cards, String subtype) {
        FilterLandCard filter = new FilterLandCard(subtype);
        filter.add(new SubtypePredicate(subtype));
        TargetCardInLibrary target = new TargetCardInLibrary(filter);
        if (player.searchLibrary(target, game)) {
            Card card = player.getLibrary().remove(target.getFirstTarget(), game);
            if (card != null) {
                card.moveToZone(Zone.HAND, source.getSourceId(), game, false);
View Full Code Here

        // Flying
        this.addAbility(FlyingAbility.getInstance());
        // Whenever Cursed Monstrosity becomes the target of a spell or ability, sacrifice it unless you discard a land card.
        this.addAbility(new BecomesTargetTriggeredAbility(
                            new SacrificeSourceUnlessPaysEffect(
                            new DiscardTargetCost(new TargetCardInHand(new FilterLandCard()))
                )));
    }
View Full Code Here

class PrimevalTitanAbility extends TriggeredAbilityImpl {

    public PrimevalTitanAbility() {
        super(Zone.BATTLEFIELD, null, true);
        TargetCardInLibrary target = new TargetCardInLibrary(0, 2, new FilterLandCard());
        this.addEffect(new SearchLibraryPutInPlayEffect(target, true, Outcome.PutLandInPlay));
    }
View Full Code Here

        this.color.setGreen(true);
        this.color.setBlack(true);

        // Put a 1/1 black and green Worm creature token onto the battlefield for each land card in your graveyard.
        CardsInControllerGraveyardCount value = new CardsInControllerGraveyardCount(new FilterLandCard());
        this.getSpellAbility().addEffect(new CreateTokenEffect(new WormHarvestToken(), value));

        // Retrace
        this.addAbility(new RetraceAbility(new ManaCostsImpl("{2}{B/G}{B/G}{B/G}"), TimingRule.SORCERY));
    }
View Full Code Here

    @Override
    public boolean apply(Game game, Ability source) {
        Player controller = game.getPlayer(source.getControllerId());
        if (controller != null) {
            TargetCardInLibrary target = new TargetCardInLibrary(new FilterLandCard());
            if (controller.searchLibrary(target, game)) {
                for (UUID cardId: target.getTargets()) {
                    Card card = game.getCard(cardId);
                    if (card != null) {
                        card.putOntoBattlefield(game, Zone.LIBRARY, source.getSourceId(), controller.getId());
                    }
                }
            }
            int opponentsUsedSearch = 0;
            for (UUID playerId : game.getOpponents(controller.getId())) {
                Player opponent = game.getPlayer(playerId);
                if (opponent != null) {
                    if (opponent.chooseUse(outcome, "Search your library for a land card and put it onto the battlefield?", game)) {
                        target.clearChosen();
                        opponentsUsedSearch++;
                        if (opponent.searchLibrary(target, game)) {
                            for (UUID cardId: target.getTargets()) {
                                Card card = game.getCard(cardId);
                                if (card != null) {
                                    card.putOntoBattlefield(game, Zone.LIBRARY, source.getSourceId(), opponent.getId());
                                }
                            }
                        }
                    }
                }
            }
            if (opponentsUsedSearch > 0) {
                target = new TargetCardInLibrary(0, opponentsUsedSearch, new FilterLandCard());
                if (controller.searchLibrary(target, game)) {
                    for (UUID cardId: target.getTargets()) {
                        Card card = game.getCard(cardId);
                        if (card != null) {
                            card.putOntoBattlefield(game, Zone.LIBRARY, source.getSourceId(), controller.getId());
View Full Code Here

        // Trample
        this.addAbility(TrampleAbility.getInstance());
        // Terravore's power and toughness are each equal to the number of land cards in all graveyards.
        this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(
                new CardsInAllGraveyardsCount(new FilterLandCard("land cards")), Duration.EndOfGame)));
    }
View Full Code Here

TOP

Related Classes of mage.filter.common.FilterLandCard

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.