Examples of TargetCardInHand


Examples of mage.target.common.TargetCardInHand

        // Deathtouch
        this.addAbility(DeathtouchAbility.getInstance());
       
        // Morph - Reveal a black card in your hand.
        this.addAbility(new MorphAbility(this, new RevealTargetFromHandCost(new TargetCardInHand(filter))));

        // When Ruthless Ripper is turned face up, target player loses 2 life.
        Effect effect = new LoseLifeTargetEffect(2);
        effect.setText("target player loses 2 life");
        Ability ability = new TurnedFaceUpSourceTriggeredAbility(effect);
View Full Code Here

Examples of mage.target.common.TargetCardInHand

        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

Examples of mage.target.common.TargetCardInHand

        this.expansionSetCode = "JUD";

        this.color.setWhite(true);

        // At the beginning of your upkeep, sacrifice Solitary Confinement unless you discard a card.
        this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new SacrificeSourceUnlessPaysEffect(new DiscardTargetCost(new TargetCardInHand())), TargetController.YOU, false));
       
        // Skip your draw step.
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SkipDrawStepEffect()));
       
        // You have shroud.
View Full Code Here

Examples of mage.target.common.TargetCardInHand

    }

    @Override
    public boolean apply(Game game, Ability source) {
        Player player = game.getPlayer(source.getControllerId());
        TargetCardInHand target = new TargetCardInHand(filter);
        if (target.canChoose(player.getId(), game) && target.choose(getOutcome(), player.getId(), source.getSourceId(), game)) {
            if (target.getTargets().size() > 0) {
                UUID cardId = target.getFirstTarget();
                Card card = player.getHand().get(cardId, game);
                if (card != null) {
                    if (card.putOntoBattlefield(game, Zone.HAND, source.getSourceId(), source.getControllerId(), true)) {
                        Permanent permanent = game.getPermanent(card.getId());
                        game.getCombat().addAttackingCreature(permanent.getId(), game);
View Full Code Here

Examples of mage.target.common.TargetCardInHand

        // Flying
        this.addAbility(FlyingAbility.getInstance());
       
        // Morph - Reveal a white card in your hand
        this.addAbility(new MorphAbility(this, new RevealTargetFromHandCost(new TargetCardInHand(filter))));
       
        // When Watcher of the Roost is turned face up, you gain 2 life.
        Effect effect = new GainLifeEffect(2);
        effect.setText("you gain 2 life");
        this.addAbility(new TurnedFaceUpSourceTriggeredAbility(effect));
View Full Code Here

Examples of mage.target.common.TargetCardInHand

        this.expansionSetCode = "7ED";

        this.color.setRed(true);

        // Discard a land card: Seismic Assault deals 2 damage to target creature or player.      
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new DiscardTargetCost(new TargetCardInHand(filter)));
        ability.addTarget(new TargetCreatureOrPlayer());
        this.addAbility(ability);
    }
View Full Code Here

Examples of mage.target.common.TargetCardInHand

            if (numLooked > 0) {
                Cards cards = new CardsImpl();
                for (int i = 0; i < numLooked; i++) {
                    cards.add(player.getLibrary().removeFromTop(game));
                }
                TargetCard target = new TargetCardInHand(new FilterCard("card to put on top of your library"));
                player.choose(Outcome.Benefit, cards, target, game);
                Card card = cards.get(target.getFirstTarget(), game);
                cards.remove(card);
                player.moveCardToLibraryWithInfo(card, source.getSourceId(), game, Zone.LIBRARY, true, false);
                player.putCardsOnBottomOfLibrary(cards, game, source, true);
            }
            return true;
View Full Code Here

Examples of mage.target.common.TargetCardInHand

    @Override
    public boolean apply(Game game, Ability source) {
        Player player = game.getPlayer(source.getControllerId());
        if (player != null) {
            if (player.chooseUse(Outcome.PutCardInPlay, "Put an Equipment from hand? (No = from graveyard)", game)) {
                Target target = new TargetCardInHand(0, 1, filter);
                target.choose(Outcome.PutCardInPlay, source.getControllerId(), source.getSourceId(), game);
                Card card = player.getHand().get(target.getFirstTarget(), game);
                if (card != null) {
                    player.putOntoBattlefieldWithInfo(card, game, Zone.HAND, source.getSourceId());
                }
            }
            else {
                Target target = new TargetCardInYourGraveyard(0, 1, filter);
                target.choose(Outcome.PutCardInPlay, source.getControllerId(), source.getSourceId(), game);
                Card card = player.getGraveyard().get(target.getFirstTarget(), game);
                if (card != null) {
                    player.putOntoBattlefieldWithInfo(card, game, Zone.GRAVEYARD, source.getSourceId());
                }
            }
            return true;
View Full Code Here

Examples of mage.target.common.TargetCardInHand

        this.toughness = new MageInt(2);

        this.addAbility(HasteAbility.getInstance());
        // {tap}, Discard a card: Draw a card.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new TapSourceCost());
        ability.addCost(new DiscardTargetCost(new TargetCardInHand()));
        this.addAbility(ability);
    }
View Full Code Here

Examples of mage.target.common.TargetCardInHand

        // First strike
        this.addAbility(FirstStrikeAbility.getInstance());

        // At the beginning of your upkeep, sacrifice Razormane Masticore unless you discard a card.
        this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new SacrificeSourceUnlessPaysEffect(new DiscardTargetCost(new TargetCardInHand())), TargetController.YOU, false));

        // At the beginning of your draw step, you may have Razormane Masticore deal 3 damage to target creature.
        Ability ability = new BeginningOfDrawTriggeredAbility(Zone.BATTLEFIELD, new DamageTargetEffect(3), TargetController.YOU, true);
        ability.addTarget(new TargetCreaturePermanent());
        this.addAbility(ability);
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.