Package mage.players

Examples of mage.players.Player.revealCards()


                    }
                }
            }
            // reveal
            if (cards.size() > 0) {
                player.revealCards("Garruk, the Veil-Cursed", cards, game);
            }
            // shuffle
            player.shuffleLibrary(game);
            return true;
        }
View Full Code Here


        if (!cards.isEmpty()) {
            TargetCard target = new TargetCard(Zone.LIBRARY, new FilterCreatureCard("creature card to put into your hand"));
            if (target.canChoose(source.getSourceId(), player.getId(), game) && player.choose(Outcome.DrawCard, cards, target, game)) {
                Card card = cards.get(target.getFirstTarget(), game);
                if (card != null) {
                    player.revealCards(sourcePermanent.getName(), new CardsImpl(card), game);
                    cards.remove(card);
                    player.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.LIBRARY);
                }
            }
        }
View Full Code Here

            Card card = controller.getLibrary().getFromTop(game);
            Cards cards = new CardsImpl(card);
            controller.lookAtCards(sourcePermanent.getName(), cards, game);
            if (card.getCardType().contains(CardType.CREATURE)) {
                if (controller.chooseUse(Outcome.DrawCard, "Do you wish to reveal the creature card at the top of the library?", game)) {
                    controller.revealCards(sourcePermanent.getName(), cards, game);
                    Permanent questForUlasTemple = game.getPermanent(source.getSourceId());
                    if (questForUlasTemple != null) {
                        questForUlasTemple.addCounters(CounterType.QUEST.createInstance(), game);
                        return true;
                    }
View Full Code Here

                Spell spell = game.getStack().getSpell(targetId);
                if (spell != null) {
                    game.getStack().counter(targetId, source.getSourceId(), game);
                    Player spellController = game.getPlayer(spell.getControllerId());
                    if (spellController != null) {
                        spellController.revealCards(sourceObject.getLogName(), spellController.getHand(), game);
                        Cards cardsToDiscard = new CardsImpl();
                        for (SpellAbility spellAbility : spell.getSpellAbilities()) {
                            if (spellAbility.getSpellAbilityType().equals(SpellAbilityType.SPLICE)) {
                                for (Card card: spellController.getHand().getCards(game)) {
                                    if (card.getName().equals(spellAbility.getCardName()) && !cardsToDiscard.contains(card.getId())) {
View Full Code Here

    public boolean apply(Game game, Ability source) {
        Player player = game.getPlayer(source.getControllerId());
        if (player != null) {
            if (player.getLibrary().size() > 0) {
                Card card = player.getLibrary().getFromTop(game);
                player.revealCards("DescendantsPath", new CardsImpl(card), game);
                if (card.getCardType().contains(CardType.CREATURE)) {
                    FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent();

                    ArrayList<Predicate<MageObject>> subtypes = new ArrayList<>();
                    for (String subtype: card.getSubtype()) {
View Full Code Here

                    opponent.moveCardToExileWithInfo(card, source.getSourceId()"Stolen Goods", source.getSourceId(), game, Zone.LIBRARY);
                }
            } while (library.size() > 0 && card != null && card.getCardType().contains(CardType.LAND));

            if (card != null) {
                opponent.revealCards("Card to cast", new CardsImpl(card), game);
                ContinuousEffect effect = new StolenGoodsCastFromExileEffect();
                effect.setTargetPointer(new FixedTarget(card.getId()));
                game.addEffect(effect, source);
            }
            return true;
View Full Code Here

        if (player.getLibrary().size() > 0) {
            Card card = player.getLibrary().getFromTop(game);
            Cards cards = new CardsImpl();
            cards.add(card);
            player.revealCards("Arbiter of the Ideal", cards, game);

            if (card != null) {
                if (filter.match(card, game) && player.chooseUse(outcome, new StringBuilder("Put ").append(card.getName()).append("onto battlefield?").toString(), game)) {
                    card.putOntoBattlefield(game, Zone.LIBRARY, source.getSourceId(), source.getControllerId());
                    Permanent permanent = game.getPermanent(card.getId());
View Full Code Here

                    }
                }
            }

            if (!cards.isEmpty()) {
                player.revealCards("Satyr Wayfinder", cards, game);
                TargetCard target = new TargetCard(Zone.PICK, filterPutInHand);
                if (properCardFound && player.choose(Outcome.DrawCard, cards, target, game)) {
                    Card card = game.getCard(target.getFirstTarget());
                    if (card != null) {
                        cards.remove(card);
View Full Code Here

    public boolean apply(Game game, Ability source) {
        Player player = game.getPlayer(source.getFirstTarget());
        if (player != null) {
            CardsImpl cards = new CardsImpl();
            cards.add(player.getLibrary().removeFromTop(game));
            player.revealCards("Top card of target player's library", cards, game);
        }
        return false;
    }
}
View Full Code Here

                            } while (!cardFound && library.size() > 0);
                            permanentController.putOntoBattlefieldWithInfo(card, game, Zone.LIBRARY, source.getSourceId());
                        }

                        if (cards.size() > 0) {
                            permanentController.revealCards("Reweave", cards, game);
                            if (cardFound && card != null) {
                                cards.remove(card);
                            }
                            library.addAll(cards.getCards(game), game);
                            permanentController.shuffleLibrary(game);
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.