Package mage.filter.common

Examples of mage.filter.common.FilterCreatureCard


        if (controller != null && sourceObject != null) {
            // move creature cards from graveyard to exile
            for (UUID playerId: controller.getInRange()){
                Player player = game.getPlayer(playerId);
                if (player != null) {
                    for (Card card :player.getGraveyard().getCards(new FilterCreatureCard(), game)) {
                        controller.moveCardToExileWithInfo(card, source.getSourceId(), sourceObject.getLogName(), source.getSourceId(), game, Zone.GRAVEYARD);
                    }
                }
            }
            // sacrifice all creatures
View Full Code Here


            if (cost instanceof PayVariableLoyaltyCost) {
                cmc = ((PayVariableLoyaltyCost) cost).getAmount();
            }
        }

        FilterCard filter = new FilterCreatureCard(new StringBuilder("creature card with converted mana cost {").append(cmc).append("} exiled with Ashiok, Nightmare Weaver").toString());
        filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.Equal, cmc));
        Target target = new TargetCardInExile(filter, CardUtil.getCardExileZoneId(game, source));

        if (target.canChoose(source.getSourceId(), player.getId(), game)) {
            if (player.chooseTarget(Outcome.PutCreatureInPlay, target, source, game)) {
                Card card = game.getCard(target.getFirstTarget());
View Full Code Here

        this.color.setBlack(true);

        // Target opponent reveals his or her hand. You choose a creature card from it. That player discards that card.
        this.getSpellAbility().addTarget(new TargetOpponent());
        this.getSpellAbility().addEffect(new DiscardCardYouChooseTargetEffect(new FilterCreatureCard("a creature card")));
    }
View Full Code Here

    @Override
    public boolean apply(Game game, Ability source) {
        Player player = game.getPlayer(source.getFirstTarget());
        if (player != null) {
            Set<Card> cards = player.getGraveyard().getCards(new FilterCreatureCard(), game);
            for(Card card : cards)
            {
                card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true);
            }
            player.shuffleLibrary(game);
View Full Code Here

        this.power = new MageInt(5);
        this.toughness = new MageInt(5);

        // Whenever another creature with power 5 or greater enters the battlefield under your control, you may return target creature card from your graveyard to your hand.
        Ability ability = new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, new ReturnFromGraveyardToHandTargetEffect(), filter, true, rule);
        ability.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard()));
        this.addAbility(ability);
       
    }
View Full Code Here

        mode.getEffects().add(new PrimalCommandShuffleGraveyardEffect());
        mode.getTargets().add(new TargetPlayer());
        this.getSpellAbility().getModes().addMode(mode);       
        // or search your library for a creature card, reveal it, put it into your hand, then shuffle your library.
        mode = new Mode();
        mode.getEffects().add(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(new FilterCreatureCard()), true, true));
        this.getSpellAbility().getModes().addMode(mode);
       
    }
View Full Code Here

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

        // {2}: Exile target creature card from a graveyard. Put a 1/1 green Saproling creature token onto the battlefield.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileTargetEffect(), new GenericManaCost(2));
        ability.addTarget(new TargetCardInGraveyard(new FilterCreatureCard()));
        ability.addEffect(new CreateTokenEffect(new SaprolingToken()));
        this.addAbility(ability);
    }
View Full Code Here

        this.addAbility(TrampleAbility.getInstance());
        // Play with the top card of your library revealed.
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PlayWithTheTopCardRevealedEffect()));
        // You may cast the top card of your library if it's a creature card.
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PlayTheTopCardEffect(new FilterCreatureCard())));
    }
View Full Code Here

        player.lookAtCards("Gift of the Gargantuan", cards, game);

        if ((creatureCardFound || landCardFound) && player.chooseUse(Outcome.DrawCard, "Do you wish to reveal a creature card and/or a land card and put them into your hand?", game)) {
            Cards revealedCards = new CardsImpl();

            TargetCard target = new TargetCard(Zone.PICK, new FilterCreatureCard("creature card to reveal and put into your hand"));
            if (creatureCardFound && 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

    @Override
    public boolean apply(Game game, Ability source) {
        Player controller = game.getPlayer(source.getControllerId());
        if (controller != null) {
            if (controller.chooseUse(Outcome.PutCreatureInPlay, choiceText, game)) {
                TargetCardInHand target = new TargetCardInHand(new FilterCreatureCard());
                if (controller.choose(Outcome.PutCreatureInPlay, target, source.getSourceId(), game)) {
                    Card card = game.getCard(target.getFirstTarget());
                    if (card != null) {
                        if (controller.putOntoBattlefieldWithInfo(card, game, Zone.HAND, source.getSourceId())) {
                            Permanent permanent = game.getPermanent(card.getId());
View Full Code Here

TOP

Related Classes of mage.filter.common.FilterCreatureCard

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.