Package mage.target.common

Examples of mage.target.common.TargetCardInOpponentsGraveyard


            FilterCard filter = new FilterCard("up to two target cards from that player's graveyard");
            filter.add(new OwnerIdPredicate(event.getPlayerId()));
            filter.setMessage("up to two cards in " + game.getPlayer(event.getTargetId()).getName() + "'s graveyard");
            this.getTargets().clear();
            this.addTarget(new TargetCardInOpponentsGraveyard(0,2,filter));
            return true;
        }
        return false;
    }
View Full Code Here


        // Intimidate
        this.addAbility(IntimidateAbility.getInstance());
        // {X}{B}: Put target artifact or creature card with converted mana cost X from an opponent's graveyard onto the battlefield under your control tapped.
        // Then that player puts the top X cards of his or her library into his or her graveyard.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GethLordOfTheVaultEffect(), new ManaCostsImpl("{X}{B}"));
        ability.addTarget(new TargetCardInOpponentsGraveyard(new FilterCard("artifact or creature card with converted mana cost X from an opponent's graveyard")));
        this.addAbility(ability);
    }
View Full Code Here

            FilterCard filter = new FilterCard(new StringBuilder("artifact or creature card with converted mana cost ").append(xValue).append(" from an opponent's graveyard").toString());
            filter.add(Predicates.or(
                new CardTypePredicate(CardType.ARTIFACT),
                new CardTypePredicate(CardType.CREATURE)));
            filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.Equal, xValue));
            Target target = new TargetCardInOpponentsGraveyard(filter);
            ability.addTarget(target);
        }
    }
View Full Code Here

        // Flying
        this.addAbility(FlyingAbility.getInstance());

        // When Puppeteer Clique enters the battlefield, put target creature card from an opponent's graveyard onto the battlefield under your control. It gains haste. At the beginning of your next end step, exile it.
        Ability ability = new EntersBattlefieldTriggeredAbility(new PuppeteerCliqueEffect(), false);
        Target target = new TargetCardInOpponentsGraveyard(new FilterCreatureCard("creature card from your opponent's graveyard"));
        ability.addTarget(target);
        this.addAbility(ability);

        // Persist
        this.addAbility(new PersistAbility());
View Full Code Here

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

        // You may cast target instant or sorcery card from an opponent's graveyard without paying its mana cost.
        this.getSpellAbility().addEffect(new MemoryPlunderEffect());
        this.getSpellAbility().addTarget(new TargetCardInOpponentsGraveyard(filter));

    }
View Full Code Here

            }
        }

        FilterCard filter = new FilterCard("creature card in an opponent's graveyard");
        filter.add(new CardTypePredicate(CardType.CREATURE));
        TargetCardInOpponentsGraveyard target = new TargetCardInOpponentsGraveyard(1, 1, filter);

        if (you != null) {
            if (target.canChoose(source.getControllerId(), game)
                    && you.choose(Outcome.GainControl, target, source.getSourceId(), game)) {
                if (!target.getTargets().isEmpty()) {
                    Card card = game.getCard(target.getFirstTarget());
                    if (card != null) {
                        if (card.getManaCost().convertedManaCost() <= allycount) {
                            card.putOntoBattlefield(game, Zone.GRAVEYARD, source.getSourceId(), source.getControllerId());
                            return true;
                        }
View Full Code Here

                Player opponent = game.getPlayer(opponentId);
                if (opponent != null) {
                    ability.getTargets().clear();
                    FilterCard filter = new FilterCreatureCard(new StringBuilder("creature card from ").append(opponent.getName()).append("'s graveyard").toString());
                    filter.add(new OwnerIdPredicate(opponentId));
                    TargetCardInOpponentsGraveyard target = new TargetCardInOpponentsGraveyard(0,1, filter);
                    ability.addTarget(target);
                }
            }
        }
    }
View Full Code Here

        this.addAbility(FlyingAbility.getInstance());

        // When Chancellor of the Spires enters the battlefield, you may cast target instant or sorcery card from an opponent's graveyard without paying its mana cost.
        Ability ability = new EntersBattlefieldTriggeredAbility(new PlayTargetWithoutPayingManaEffect(), true);
        ability.addTarget(new TargetCardInOpponentsGraveyard(filter));
        this.addAbility(ability);
    }
View Full Code Here

        this.color.setBlack(true);

        this.getSpellAbility().addEffect(new GruesomeEncoreEffect());
        this.getSpellAbility().addEffect(new GruesomeEncoreReplacementEffect());
        this.getSpellAbility().addTarget(new TargetCardInOpponentsGraveyard(filter));
    }
View Full Code Here

        this.expansionSetCode = "MIR";

        this.color.setBlack(true);

        // Put target creature card from an opponent's graveyard onto the battlefield under your control.
        this.getSpellAbility().addTarget(new TargetCardInOpponentsGraveyard(new FilterCreatureCard("creature card from an opponent's graveyard")));
        this.getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect());
    }
View Full Code Here

TOP

Related Classes of mage.target.common.TargetCardInOpponentsGraveyard

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.