Package mage.abilities.costs.common

Examples of mage.abilities.costs.common.DiscardTargetCost


        // Flying
        this.addAbility(FlyingAbility.getInstance());
       
        // Discard a card: Return Ephemeron to its owner's hand.
        this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true), new DiscardTargetCost(new TargetCardInHand())));
    }
View Full Code Here


*/
public class RetraceAbility extends ActivatedAbilityImpl {

    public RetraceAbility(Cost cost, TimingRule timingRule) {
        super(Zone.GRAVEYARD, new RetraceEffect(), cost);
        super.addCost(new DiscardTargetCost(new TargetCardInHand(new FilterLandCard())));
        this.timing = timingRule;
        this.usesStack = false;
    }
View Full Code Here

        this.color.setGreen(true);

        // {G}, Discard a creature card: Search your library for a creature card, reveal that card, and put it into your hand. Then shuffle your library.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SearchLibraryPutInHandEffect(new TargetCardInLibrary(filter), true, true), new ColoredManaCost(ColoredManaSymbol.G));
        ability.addCost(new DiscardTargetCost(new TargetCardInHand(filter)));
        this.addAbility(ability);
    }
View Full Code Here

        this.expansionSetCode = "EXO";

        this.color.setBlue(true);

        // Buyback-Discard two cards.
        this.addAbility(new BuybackAbility(new DiscardTargetCost(new TargetCardInHand(2, new FilterCard("two cards")))));
        // Counter target spell.
        this.getSpellAbility().addEffect(new CounterTargetEffect());
        this.getSpellAbility().addTarget(new TargetSpell());
    }
View Full Code Here

        this.cardName = cardName;
       
        FilterCard filter = new FilterCard("another card named " + cardName);
        filter.add(new NamePredicate(cardName));
        filter.add(new AnotherCardPredicate());
        this.addCost(new DiscardTargetCost(new TargetCardInHand(filter)));
    }
View Full Code Here

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

        // Discard a card: Regenerate Patchwork Gnomes.
        this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new DiscardTargetCost(new TargetCardInHand(new FilterCard("a card")))));
    }
View Full Code Here

    this.toughness = new MageInt(2);

    Costs<Cost> costs = new CostsImpl();
    costs.add(new ColoredManaCost(ColoredManaSymbol.G));
    costs.add(new TapSourceCost());
    costs.add(new DiscardTargetCost(new TargetCardInHand(new FilterCreatureCard())));
    Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SearchLibraryRevealPutInHandEffect(new TargetCardInLibrary(new FilterCreatureCard())), costs);
    this.addAbility(ability);
  }
View Full Code Here

        returnLandToHand.addTarget(targetLandYouControl);
        this.addAbility(returnLandToHand);

        // {1}, Discard a land card: Draw a card.
        Ability drawACard = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new GenericManaCost(1));
        drawACard.addCost(new DiscardTargetCost(new TargetCardInHand(new FilterLandCard("a land card"))));
        this.addAbility(drawACard);
    }
View Full Code Here

    @Override
    public boolean apply(Game game, Ability source) {
        Player player = game.getPlayer(targetPointer.getFirst(game, source));
        if (player != null) {
            Cost cost = new DiscardTargetCost(new TargetCardInHand());
            if (cost.canPay(source, player.getId(), player.getId(), game)) {
                if (!cost.pay(source, game, player.getId(), player.getId(), false)) {
                    player.loseLife(5, game);
                }
                return true;
            }
        }
View Full Code Here

        this.supertype.add("Legendary");

        // {1}, {tap}, Discard a card: Put a study counter on Grimoire of the Dead.
        Ability ability1 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.STUDY.createInstance()), new ManaCostsImpl("{1}"));
        ability1.addCost(new TapSourceCost());
        ability1.addCost(new DiscardTargetCost(new TargetCardInHand()));
        this.addAbility(ability1);

        // {tap}, Remove three study counters from Grimoire of the Dead and sacrifice it: Put all creature cards from all graveyards onto the battlefield under your control. They're black Zombies in addition to their other colors and types.
        Ability ability2 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GrimoireOfTheDeadEffect(), new TapSourceCost());
        ability2.addCost(new RemoveCountersSourceCost(CounterType.STUDY.createInstance(3)));
View Full Code Here

TOP

Related Classes of mage.abilities.costs.common.DiscardTargetCost

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.