Examples of TargetCardInHand


Examples of mage.target.common.TargetCardInHand

        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

Examples of mage.target.common.TargetCardInHand

        this.subtype.add("Forest");

        // <i>({tap}: Add {G} to your mana pool.)</i>
        this.addAbility(new GreenManaAbility());
        // As Murmuring Bosk enters the battlefield, you may reveal a Treefolk card from your hand. If you don't, Murmuring Bosk enters the battlefield tapped.
        this.addAbility(new AsEntersBattlefieldAbility(new TapSourceUnlessPaysEffect(new RevealTargetFromHandCost(new TargetCardInHand(filter))), "you may reveal a Treefolk card from your hand. If you don't, {this} enters the battlefield tapped"));
        // {tap}: Add {W} or {B} to your mana pool. Murmuring Bosk deals 1 damage to you.
        Ability ability = new WhiteManaAbility();
        ability.addEffect(new DamageControllerEffect(1));
        this.addAbility(ability);
        ability = new BlackManaAbility();
View Full Code Here

Examples of mage.target.common.TargetCardInHand

        return false;
    }
   
    private boolean putInLibrary(Player player, Ability source, Game game, boolean putOnTop) {
        if (player.getHand().size() > 0) {
            TargetCardInHand target = new TargetCardInHand();
            player.chooseTarget(Outcome.Detriment, target, source, game);
            Card card = player.getHand().get(target.getFirstTarget(), game);
            if (card != null) {
                player.getHand().remove(card);
                card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, putOnTop);
                return true;
            }
View Full Code Here

Examples of mage.target.common.TargetCardInHand

    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

Examples of mage.target.common.TargetCardInHand

        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

Examples of mage.target.common.TargetCardInHand

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

        // {2}, Exile a nonland card from your hand: Put four time counters on the exiled card. If it doesn't have suspend, it gains suspend.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new JhoiraOfTheGhituSuspendEffect(), new GenericManaCost(2));
        ability.addCost(new ExileFromHandCost(new TargetCardInHand(new FilterNonlandCard("a nonland card from your hand"))));
        this.addAbility(ability);

    }
View Full Code Here

Examples of mage.target.common.TargetCardInHand

                        }
                    }
                }
                int numberOfTargets = Math.min(2, cards.size());
                if (numberOfTargets > 0) {
                    TargetCardInHand target = new TargetCardInHand(numberOfTargets, new FilterCard(new StringBuilder(numberOfTargets).append(" cards of cards drawn this turn").toString()));
                    controller.chooseTarget(outcome, cards, target, source, game);

                    Cards cardsPutBack = new CardsImpl();
                    for (UUID cardId :target.getTargets()) {
                        Card card = cards.get(cardId, game);
                        if (card != null) {
                            if (controller.canPayLifeCost()
                                    && controller.getLife() >= 4
                                    && controller.chooseUse(outcome, new StringBuilder("Pay 4 life for ").append(card.getName()).append("? (Otherwise it's put on top of your library)").toString(), game)) {
View Full Code Here

Examples of mage.target.common.TargetCardInHand

    @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

Examples of mage.target.common.TargetCardInHand

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

        // Morph - Reveal a blue card in your hand.
        this.addAbility(new MorphAbility(this, new RevealTargetFromHandCost(new TargetCardInHand(filter))));
       
        // When Dragon's Eye Savants is turned face up, look at target opponent's hand.
        Effect effect = new LookAtTargetPlayerHandEffect();
        effect.setText("look at target opponent's hand");
        Ability ability = new TurnedFaceUpSourceTriggeredAbility(effect);
View Full Code Here

Examples of mage.target.common.TargetCardInHand

        this.color.setGreen(true);
        this.power = new MageInt(3);
        this.toughness = new MageInt(1);

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

        // When Temur Charger is turned face up, target creature gains trample until end of turn.
        Ability ability = new TurnedFaceUpSourceTriggeredAbility(new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn));
        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.