Examples of TargetCardInGraveyard


Examples of mage.target.common.TargetCardInGraveyard

        filter.add(new OwnerIdPredicate(damagedPlayer.getId()));
        filter.add(Predicates.or(
                new CardTypePredicate(CardType.INSTANT),
                new CardTypePredicate(CardType.SORCERY)));

        Target target = new TargetCardInGraveyard(filter);

        if (you != null) {
            if (you.chooseTarget(Outcome.PlayForFree, target, source, game)) {
                Card card = game.getCard(target.getFirstTarget());
                if (card != null) {
                    you.cast(card.getSpellAbility(), game, true);
                    game.addEffect(new WrexialReplacementEffect(card.getId()), source);
                }
            }
View Full Code Here

Examples of mage.target.common.TargetCardInGraveyard

        Player damagedPlayer = game.getPlayer(targetPointer.getFirst(game, source));
        Player you = game.getPlayer(source.getControllerId());
        FilterCard filter = new FilterCard("creature in that player's graveyard");
        filter.add(new CardTypePredicate(CardType.CREATURE));
        filter.add(new OwnerIdPredicate(damagedPlayer.getId()));
        TargetCardInGraveyard target = new TargetCardInGraveyard(filter);
        if (target.canChoose(source.getSourceId(), you.getId(), game)) {
            if (you.chooseTarget(Outcome.PutCreatureInPlay, target, source, game)) {
                Card card = game.getCard(target.getFirstTarget());
                if (card != null) {
                    card.putOntoBattlefield(game, Zone.GRAVEYARD, id, you.getId());
                    return true;
                }
            }
View Full Code Here

Examples of mage.target.common.TargetCardInGraveyard

        super(ownerId, 133, "Conversion Chamber", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{3}");
        this.expansionSetCode = "NPH";
        // {2}, {T}: Exile target artifact card from a graveyard. Put a charge counter on Conversion Chamber.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileTargetEffect(), new GenericManaCost(2));
        ability.addEffect(new AddCountersSourceEffect(CounterType.CHARGE.createInstance()));
        ability.addTarget(new TargetCardInGraveyard(new FilterArtifactCard("artifact card from a graveyard")));
        ability.addCost(new TapSourceCost());
        this.addAbility(ability);
        // {2}, {T}, Remove a charge counter from Conversion Chamber: Put a 3/3 colorless Golem artifact creature token onto the battlefield.
        ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new GolemToken()), new GenericManaCost(2));
        ability.addCost(new TapSourceCost());
View Full Code Here

Examples of mage.target.common.TargetCardInGraveyard

        this.color.setBlack(true);

        // Put target creature card from a graveyard onto the battlefield under your control. It gains indestructible. If it's your turn, scry 2.
        this.getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect());
        this.getSpellAbility().addTarget(new TargetCardInGraveyard(new FilterCreatureCard("creature card from a graveyard")));
        this.getSpellAbility().addEffect(new GainAbilityTargetEffect(IndestructibleAbility.getInstance(), Duration.Custom,
                "It gains indestructible"));
        this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new ScryEffect(2), MyTurnCondition.getInstance(),
                "If it's your turn, scry 2 <i>(Look at the top two cards of your library, then put any number of them on the bottom of your library and the rest on top in any order.)</i>"));
    }
View Full Code Here

Examples of mage.target.common.TargetCardInGraveyard

        Player damagedPlayer = game.getPlayer(targetPointer.getFirst(game, source));
        Player you = game.getPlayer(source.getControllerId());
        FilterCard filter = new FilterCard("creature in that player's graveyard");
        filter.add(new CardTypePredicate(CardType.CREATURE));
        filter.add(new OwnerIdPredicate(damagedPlayer.getId()));
        TargetCardInGraveyard target = new TargetCardInGraveyard(filter);
        if (target.canChoose(source.getSourceId(), you.getId(), game)) {
            if (you.chooseTarget(Outcome.PutCreatureInPlay, target, source, game)) {
                Card card = game.getCard(target.getFirstTarget());
                if (card != null) {
                    card.putOntoBattlefield(game, Zone.GRAVEYARD, source.getSourceId(), you.getId());
                    return true;
                }
            }
View Full Code Here

Examples of mage.target.common.TargetCardInGraveyard

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

        // Sacrifice Heap Doll: Exile target card from a graveyard.
        SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileTargetEffect(), new SacrificeSourceCost());
        ability.addTarget(new TargetCardInGraveyard());
        this.addAbility(ability);
    }
View Full Code Here

Examples of mage.target.common.TargetCardInGraveyard

        ability2.addCost(new PayLifeCost(1));
        this.addAbility(ability2);
       
        // {1}, {tap}, Sacrifice a creature: Return target artifact card from your graveyard to your hand.
        Ability ability3 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnFromGraveyardToHandTargetEffect(), new GenericManaCost(1));
        ability3.addTarget(new TargetCardInGraveyard(new FilterArtifactCard("artifact card in your graveyard")));
        ability3.addCost(new TapSourceCost());
        ability3.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter)));
        this.addAbility(ability3);
       
        // {1}, {tap}, Sacrifice an artifact: Draw a card.
View Full Code Here

Examples of mage.target.common.TargetCardInGraveyard

        // Split second
        this.addAbility(new SplitSecondAbility());
        // Choose target card in a graveyard other than a basic land card. Search its owner's graveyard, hand, and library for all cards with the same name as that card and exile them. Then that player shuffles his or her library.
        this.getSpellAbility().addEffect(new ExtirpateEffect());
        this.getSpellAbility().addTarget(new TargetCardInGraveyard(filter));
    }
View Full Code Here

Examples of mage.target.common.TargetCardInGraveyard

        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

Examples of mage.target.common.TargetCardInGraveyard

            }
        }
        permanent.removeAllAbilities(source.getSourceId(), game);
        // gains ability of Dimir Doppelganger
        Ability dimirDoppelgangerAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DimirDoppelgangerEffect(), new ManaCostsImpl("{1}{U}{B}"));
        dimirDoppelgangerAbility.addTarget(new TargetCardInGraveyard(new FilterCreatureCard("creature card in a graveyard")));
        permanent.addAbility(dimirDoppelgangerAbility, source.getSourceId(), game);

        for (Ability ability : cardToCopy.getAbilities()) {
            if (!permanent.getAbilities().contains(ability)) {
                permanent.addAbility(ability, source.getSourceId(), game);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.