Package mage.target.common

Examples of mage.target.common.TargetCardInYourGraveyard


        this.color.setGreen(true);

        // Return target card from your graveyard to your hand.
        this.getSpellAbility().addEffect(new ReturnToHandTargetEffect());
        this.getSpellAbility().addTarget(new TargetCardInYourGraveyard());
    }
View Full Code Here


        this.color.setBlue(true);
        this.power = new MageInt(5);
        this.toughness = new MageInt(6);

        // As an additional cost to cast Skaab Ruinator, exile three creature cards from your graveyard.
        this.getSpellAbility().addCost(new ExileFromGraveCost(new TargetCardInYourGraveyard(3, 3, new FilterCreatureCard("creature card from your graveyard"))));

        this.addAbility(FlyingAbility.getInstance());
        // You may cast Skaab Ruinator from your graveyard.
        this.addAbility(new SkaabRuinatorAbility(new ManaCostsImpl("{1}{U}{U}"), TimingRule.INSTANT));
View Full Code Here

class SkaabRuinatorAbility extends ActivatedAbilityImpl {

    public SkaabRuinatorAbility(ManaCosts costs, TimingRule timingRule) {
        super(Zone.GRAVEYARD, new SkaabRuinatorEffect(), costs);
        this.timing = TimingRule.SORCERY;
        this.addCost(new ExileFromGraveCost(new TargetCardInYourGraveyard(3, 3, new FilterCreatureCard("creature card from your graveyard"))));
        this.usesStack = false;
    }
View Full Code Here

    }

    @Override
    public boolean apply(Game game, Ability source) {
        Player you = game.getPlayer(source.getControllerId());
        TargetCardInYourGraveyard target1 = new TargetCardInYourGraveyard(new FilterCreatureCard("creature card in your graveyard"));
        TargetCreaturePermanent target2 = new TargetCreaturePermanent();

        if (you != null) {
            if (target1.canChoose(source.getControllerId(), game)
                    && you.choose(Outcome.Benefit, target1, source.getSourceId(), game)
                    && target2.canChoose(source.getControllerId(), game)
                    && you.choose(Outcome.Damage, target2, source.getSourceId(), game)) {
                Card creatureInGraveyard = game.getCard(target1.getFirstTarget());
                if (creatureInGraveyard != null) {
                    if (creatureInGraveyard.moveToZone(Zone.LIBRARY, id, game, true)) {
                        int power = creatureInGraveyard.getPower().getValue();
                        Permanent creature = game.getPermanent(target2.getFirstTarget());
                        if (creature != null) {
View Full Code Here

        // Flying
        this.addAbility(FlyingAbility.getInstance());
        // When Griffin Dreamfinder enters the battlefield, return target enchantment card from your graveyard to your hand.
        Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnFromGraveyardToHandTargetEffect(), false);
        ability.addTarget(new TargetCardInYourGraveyard(filter));
        this.addAbility(ability);
    }
View Full Code Here

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

        // Return target creature card from your graveyard to your hand. Morgue Burst deals damage to target creature or player equal to the power of the card returned this way.
        this.getSpellAbility().addEffect(new MorgueBurstEffect());
        this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
        this.getSpellAbility().addTarget(new TargetCreatureOrPlayer());
    }
View Full Code Here

        // Other Zombie creatures get +1/+1.
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(1, 1, Duration.WhileOnBattlefield, filter, true)));
        // {1}{B}, {tap}: Return target Zombie card from your graveyard to your hand.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandTargetEffect(), new ManaCostsImpl("{1}{B}"));
        ability.addCost(new TapSourceCost());
        ability.addTarget(new TargetCardInYourGraveyard(filterCard));
        this.addAbility(ability);
    }
View Full Code Here

        this.power = new MageInt(3);
        this.toughness = new MageInt(2);

        // When Driver of the Dead dies, return target creature card with converted mana cost 2 or less from your graveyard to the battlefield.
        Ability ability = new DiesTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect(), false);
        Target target = new TargetCardInYourGraveyard(filter);
        ability.addTarget(target);
        this.addAbility(ability);
    }
View Full Code Here

        this.color.setBlue(true);

        // Return target artifact card from your graveyard to the battlefield.
        this.getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect());
        this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterArtifactCard("artifact card from your graveyard")));
    }
View Full Code Here

        this.subtype.add("Eldrazi");
        this.power = new MageInt(10);
        this.toughness = new MageInt(9);
        // When you cast Artisan of Kozilek, you may return target creature card from your graveyard to the battlefield.
        Ability ability = new CastSourceTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect(), true);
        ability.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
        this.addAbility(ability);
        // Annihilator 2
        this.addAbility(new AnnihilatorAbility(2));
    }
View Full Code Here

TOP

Related Classes of mage.target.common.TargetCardInYourGraveyard

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.