Package mage.filter.common

Examples of mage.filter.common.FilterInstantOrSorceryCard


                card.moveToExile(source.getSourceId(), "Chandra Pyromaster", source.getSourceId(), game);
                cards.add(card);
            }
        }

        if (cards.getCards(new FilterInstantOrSorceryCard(), game).size() > 0) {
            TargetCard target = new TargetCard(Zone.EXILED, new FilterInstantOrSorceryCard());
            if (you.chooseTarget(Outcome.PlayForFree, cards, target, source, game)) {
                Card card = cards.get(target.getFirstTarget(), game);
                if (card != null) {
                    Card copy1 = card.copy();
                    Card copy2 = card.copy();
View Full Code Here


        this.expansionSetCode = "JOU";

        this.color.setRed(true);

        // Spite of Mogis deals damage to target creature equal to the number of instant and sorcery cards in your graveyard. Scry 1.
        this.getSpellAbility().addEffect(new DamageTargetEffect(new CardsInControllerGraveyardCount(new FilterInstantOrSorceryCard("instant and sorcery cards"))));
        this.getSpellAbility().addTarget(new TargetCreaturePermanent());
        this.getSpellAbility().addEffect(new ScryEffect(1));
    }
View Full Code Here

    @Override
    public boolean apply(Game game, Ability source) {
        source.getManaCostsToPay().getX();
        int count = source.getManaCostsToPay().getX();

        FilterInstantOrSorceryCard filter = new FilterInstantOrSorceryCard("instant or sorcery card with converted mana cost equal to " + count);
        filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.Equal, count));
        String choiceText = "Exile a " + filter.getMessage() + " from your hand?";

        Player player = game.getPlayer(source.getControllerId());
        if (player == null || player.getHand().count(filter, game) == 0
                || !player.chooseUse(this.outcome, choiceText, game)) {
            return 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, "Cast an instant or sorcery from exile?", game)) {
                TargetCardInExile target = new TargetCardInExile(new FilterInstantOrSorceryCard(), CardUtil.getCardExileZoneId(game, source));
                if (controller.choose(Outcome.PlayForFree, game.getExile().getExileZone(CardUtil.getCardExileZoneId(game, source)), target, game)) {
                    Card card = game.getCard(target.getFirstTarget());
                    if (card != null) {
                        game.getExile().removeCard(card, game);
                        return controller.cast(card.getSpellAbility(), game, true);
View Full Code Here

            Cards revealedCards = new CardsImpl(Zone.HAND);
            revealedCards.addAll(opponent.getHand());
            opponent.revealCards("Reveal", revealedCards, game);
           
            //You may copy an instant or sorcery card in it
            TargetCard target = new TargetCard(1, Zone.HAND, new FilterInstantOrSorceryCard())
            target.setRequired(false);
            if (controller.choose(outcome, revealedCards, target, game)) {
                Card card = revealedCards.get((UUID) target.getFirstTarget(), game);
                //If you do, you may cast the copy without paying its mana cost
                if(card != null){
View Full Code Here

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

        // When Sin Collector enters the battlefield, target opponent reveals his or her hand. You choose an instant or sorcery card from it and exile that card.
        Ability ability = new EntersBattlefieldTriggeredAbility(new ExileCardYouChooseTargetOpponentEffect(new FilterInstantOrSorceryCard("an instant or sorcery card")));
        ability.addTarget(new TargetOpponent());
        this.addAbility(ability);
    }
View Full Code Here

    public boolean apply(Game game, Ability source) {
        Permanent permanent = game.getPermanent(source.getSourceId());
        if (permanent != null) {
            Object obj = getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY);
            if (obj != null && obj instanceof SpellAbility) {
                CardsInAllGraveyardsCount instantsAndSorceries = new CardsInAllGraveyardsCount(new FilterInstantOrSorceryCard("instant or sorcery cards"));
                int instantsAndSorceriesCount = instantsAndSorceries.calculate(game, source, this);
                if (instantsAndSorceriesCount > 0) {
                    permanent.addCounters(CounterType.P1P1.createInstance(instantsAndSorceriesCount), game);
                }
            }
View Full Code Here

        this.addAbility(FlyingAbility.getInstance());
        // Trample
        this.addAbility(TrampleAbility.getInstance());
        // Spellheart Chimera's power is equal to the number of instant and sorcery cards in your graveyard.
        this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerSourceEffect(
                new CardsInControllerGraveyardCount(new FilterInstantOrSorceryCard("instant and sorcery cards in your graveyard")), Duration.EndOfGame)));
    }
View Full Code Here

TOP

Related Classes of mage.filter.common.FilterInstantOrSorceryCard

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.