Package mage.cards.repository

Examples of mage.cards.repository.CardInfo


                    } else {
                        commandsB.put(gameZone, "clear");
                    }
                } else {
                    for (int i = 0; i < amount; i++) {
                        CardInfo cardInfo = CardRepository.instance.findCard(cardName);
                        Card card = cardInfo != null ? cardInfo.getCard() : null;
                        if (card != null) {
                            if (gameZone.equals(Zone.BATTLEFIELD)) {
                                PermanentCard p = new PermanentCard(card, null);
                                p.setTapped(tapped);
                                perms.add(p);
View Full Code Here


    public void addCard(Zone gameZone, TestPlayer player, String cardName, int count, boolean tapped) {


        if (gameZone.equals(Zone.BATTLEFIELD)) {
            for (int i = 0; i < count; i++) {
                CardInfo cardInfo = CardRepository.instance.findCard(cardName);
                Card card = cardInfo != null ? cardInfo.getCard() : null;
                if (card == null) {
                    throw new IllegalArgumentException("[TEST] Couldn't find a card: " + cardName);
                }
                PermanentCard p = new PermanentCard(card, null);
                p.setTapped(tapped);
                if (player.equals(playerA)) {
                    battlefieldCardsA.add(p);
                } else if (player.equals(playerB)) {
                    battlefieldCardsB.add(p);
                }
            }
        } else {
            if (tapped) {
                throw new IllegalArgumentException("Parameter tapped=true can be used only for Zone.BATTLEFIELD.");
            }
            List<Card> cards = getCardList(gameZone, player);
            for (int i = 0; i < count; i++) {
                CardInfo cardInfo = CardRepository.instance.findCard(cardName);
                Card card = cardInfo != null ? cardInfo.getCard() : null;
                cards.add(card);
            }
        }
    }
View Full Code Here

TOP

Related Classes of mage.cards.repository.CardInfo

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.