Examples of TargetCardInHand


Examples of mage.target.common.TargetCardInHand

        // {1}, Reveal X green cards from your hand, Sacrifice Martyr of Spores: Target creature gets +X/+X until end of turn.
        Effect effect = new BoostTargetEffect(new RevealTargetFromHandCostCount(), new RevealTargetFromHandCostCount(), Duration.EndOfTurn, true);
        effect.setText("Target creature gets +X/+X until end of turn.");
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new GenericManaCost(1));
        ability.addCost(new RevealTargetFromHandCost(new TargetCardInHand(0, Integer.MAX_VALUE, filter)));
        ability.addCost(new SacrificeSourceCost());
        ability.addTarget(new TargetCreaturePermanent());
        this.addAbility(ability);
    }
View Full Code Here

Examples of mage.target.common.TargetCardInHand

                // cards in Hand
                cardsCount = targetPlayer.getHand().count(filter, game);
                if (cardsCount > 0) {
                    filter.setMessage("card named " + card.getName() + " in the hand of " + targetPlayer.getName());
                    TargetCardInHand target = new TargetCardInHand(0, cardsCount, filter);
                    if (player.choose(Outcome.Exile, targetPlayer.getHand(), target, game)) {
                        List<UUID> targets = target.getTargets();
                        for (UUID targetId : targets) {
                            Card targetCard = targetPlayer.getHand().get(targetId, game);
                            if (targetCard != null) {
                                player.moveCardToExileWithInfo(targetCard, null, "", source.getSourceId(), game, Zone.HAND);                               
                            }
                        }
                    }
                } else {
                    player.lookAtCards(targetPlayer.getName() + " hand", targetPlayer.getHand(), game);
                }

                // cards in Library
                cardsCount = cardsInLibrary.count(filter, game);
                if (cardsCount > 0) {
                    filter.setMessage("card named " + card.getName() + " in the library of " + targetPlayer.getName());
                    TargetCardInLibrary target = new TargetCardInLibrary(0, cardsCount, filter);
                    if (player.searchLibrary(target, game, targetPlayer.getId())) {
                        List<UUID> targets = target.getTargets();
                        for (UUID targetId : targets) {
                            Card targetCard = targetPlayer.getLibrary().getCard(targetId, game);
                            if (targetCard != null) {
                                player.moveCardToExileWithInfo(targetCard, null, "", source.getSourceId(), game, Zone.LIBRARY);                               
                            }
View Full Code Here

Examples of mage.target.common.TargetCardInHand

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

Examples of mage.target.common.TargetCardInHand

        return new RevealVariableBlackCardsFromHandCost(this);
    }
   
    @Override
    public Cost getFixedCostsFromAnnouncedValue(int xValue) {
        return new RevealTargetFromHandCost(new TargetCardInHand(0, xValue, filter));
    }
View Full Code Here

Examples of mage.target.common.TargetCardInHand

        // {1}, Reveal X white cards from your hand, Sacrifice Martyr of Sands: You gain three times X life.
        Effect effect = new GainLifeEffect(new MultipliedValue(new RevealTargetFromHandCostCount(), 3));
        effect.setText("You gain three times X life.");
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{1}"));
        ability.addCost(new RevealTargetFromHandCost(new TargetCardInHand(0, Integer.MAX_VALUE, filter)));
        ability.addCost(new SacrificeSourceCost());
        this.addAbility(ability);
    }
View Full Code Here

Examples of mage.target.common.TargetCardInHand

        // {2}, Reveal X red cards from your hand, Sacrifice Martyr of Ashes: Martyr of Ashes deals X damage to each creature without flying.
        Effect effect = new DamageAllEffect(new RevealTargetFromHandCostCount(), filterCreature);
        effect.setText("Martyr of Ashes deals X damage to each creature without flying.");
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new GenericManaCost(2));
        ability.addCost(new RevealTargetFromHandCost(new TargetCardInHand(0, Integer.MAX_VALUE, filterHand)));
        ability.addCost(new SacrificeSourceCost());
        this.addAbility(ability);
    }
View Full Code Here

Examples of mage.target.common.TargetCardInHand

        if (player == null || player.getHand().count(filter, game) == 0
                || !player.chooseUse(this.outcome, choiceText, game)) {
            return false;
        }

        TargetCardInHand target = new TargetCardInHand(filter);
        if (player.choose(this.outcome, target, source.getSourceId(), game)) {
            Card card = game.getCard(target.getFirstTarget());
            if (card != null) {
                player.putOntoBattlefieldWithInfo(card, game, Zone.HAND, source.getSourceId());
                return true;
            }
        }
View Full Code Here

Examples of mage.target.common.TargetCardInHand

        // You may exile a blue card from your hand rather than pay Misdirection's mana cost.
        FilterOwnedCard filterCardInHand = new FilterOwnedCard("a blue card from your hand");
        filterCardInHand.add(new ColorPredicate(ObjectColor.BLUE));
        // the exile cost can never be paid with the card itself
        filterCardInHand.add(Predicates.not(new CardIdPredicate(this.getId())));      
        this.addAbility(new AlternativeCostSourceAbility(new ExileFromHandCost(new TargetCardInHand(filterCardInHand))));

        // Change the target of target spell with a single target.
        this.getSpellAbility().addEffect(new ChooseNewTargetsTargetEffect(true, true));
        this.getSpellAbility().addTarget(new TargetSpell(filter2));
    }
View Full Code Here

Examples of mage.target.common.TargetCardInHand

        this.expansionSetCode = "KTK";

        this.color.setRed(true);

        // As an additional cost to cast Tormenting Voice, discard a card.
        this.getSpellAbility().addCost(new DiscardTargetCost(new TargetCardInHand()));
        // Draw two cards.
        this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(2));
    }
View Full Code Here

Examples of mage.target.common.TargetCardInHand

        // {2}, Reveal X blue cards from your hand, Sacrifice Martyr of Frost: Counter target spell unless its controller pays {X}.
        Effect effect = new CounterUnlessPaysEffect(new RevealTargetFromHandCostCount());
        effect.setText("Counter target spell unless its controller pays {X}.");
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new GenericManaCost(2));
        ability.addCost(new RevealTargetFromHandCost(new TargetCardInHand(0, Integer.MAX_VALUE, filter)));
        ability.addCost(new SacrificeSourceCost());
        ability.addTarget(new TargetSpell());
        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.