Package mage.filter.common

Examples of mage.filter.common.FilterCreatureCard


        // Convoke
        this.addAbility(new ConvokeAbility());
       
        // Put target creature card from a graveyard onto the battlefield under your control.
        this.getSpellAbility().addTarget(new TargetCardInGraveyard(new FilterCreatureCard("creature card from a graveyard")));
        this.getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect());
    }
View Full Code Here


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

        this.addAbility(TrampleAbility.getInstance());
        // Splinterfright's power and toughness are each equal to the number of creature cards in your graveyard.
        CardsInControllerGraveyardCount count = new CardsInControllerGraveyardCount(new FilterCreatureCard("creature cards"));
        this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(count, Duration.EndOfGame)));
        // At the beginning of your upkeep, put the top two cards of your library into your graveyard.
        this.addAbility(new OnEventTriggeredAbility(EventType.UPKEEP_STEP_PRE, "beginning of your upkeep", new PutTopCardOfLibraryIntoGraveControllerEffect(2), false));
    }
View Full Code Here

    @Override
    public boolean apply(Game game, Ability source) {
        Player player = game.getPlayer(source.getControllerId());
        if (player != null) {
            WolfToken token = new WolfToken();
            int count = player.getGraveyard().count(new FilterCreatureCard(), game);
            for (int i = 0; i < count; i++) {
                token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId(), true, true);
            }
            return true;
        }
View Full Code Here

}

class BackFromTheBrinkCost extends CostImpl {

    public BackFromTheBrinkCost() {
        this.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
        this.text = "Exile a creature card from your graveyard and pay its mana cost";
    }
View Full Code Here

        this.toughness = new MageInt(4);

        // At the beginning of your upkeep, if Genesis is in your graveyard, you may pay {2}{G}. If you do, return target creature card from your graveyard to your hand.
        Ability ability = new BeginningOfUpkeepTriggeredAbility(
                Zone.GRAVEYARD, new DoIfCostPaid(new ReturnFromGraveyardToHandTargetEffect(), new ManaCostsImpl("{3}")),TargetController.YOU, false, false);
        ability.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
        this.addAbility(ability);
    }
View Full Code Here

        this.getSpellAbility().addTarget(new TargetPlayer());

        // * Return target creature card with converted mana cost X or less from your graveyard to the battlefield.
        Mode mode = new Mode();
        mode.getEffects().add(new ReturnFromGraveyardToBattlefieldTargetEffect());
        mode.getTargets().add(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
        this.getSpellAbility().addMode(mode);

        // * Target creature gets -X/-X until end of turn.
        mode = new Mode();
        mode.getEffects().add(new BoostTargetEffect(xValue, xValue, Duration.EndOfTurn));
View Full Code Here

            Mode mode = ability.getModes().get(modeId);
            for (Effect effect :mode.getEffects()) {
                if (effect instanceof ReturnFromGraveyardToBattlefieldTargetEffect) {
                    mode.getTargets().clear();
                    int xValue = ability.getManaCostsToPay().getX();
                    FilterCard filter = new FilterCreatureCard("creature card with converted mana cost " + xValue +  " or less from your graveyard");
                    filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, xValue + 1));
                    mode.getTargets().add(new TargetCardInYourGraveyard(filter));
                }
                if (effect instanceof GainAbilityTargetEffect) {
                    mode.getTargets().clear();
                    int xValue = ability.getManaCostsToPay().getX();
View Full Code Here

    }

    @Override
    public boolean apply(Game game, Ability source) {
        Player p = game.getPlayer(source.getControllerId());
        if (p != null && p.getGraveyard().count(new FilterCreatureCard(), game) >= value)
        {
                    return true;
        }
        return false;
    }
View Full Code Here

        // {tap}: Add {1} to your mana pool.
        this.addAbility(new ColorlessManaAbility());
       
        // {2}, {tap}: Until end of turn, you may play creature cards as though they had flash.
        Effect effect = new AddContinuousEffectToGame(new CastAsThoughItHadFlashEffect(Duration.EndOfTurn, new FilterCreatureCard()));
        effect.setText("Until end of turn, you may play creature cards as though they had flash");
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new GenericManaCost(2));
        ability.addCost(new TapSourceCost());
        this.addAbility(ability);
    }
View Full Code Here

        this.color.setBlack(true);
        this.power = new MageInt(6);
        this.toughness = new MageInt(6);
        this.addAbility(new SwampwalkAbility());
        Ability ability = new BeginningOfUpkeepTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect(false), TargetController.YOU, false);
        ability.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
        this.addAbility(ability);
        ability = new BeginningOfUpkeepTriggeredAbility(new SacrificeEffect(new FilterCreaturePermanent(), 1, "that player "), TargetController.OPPONENT, false);
        this.addAbility(ability);
    }
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.