Examples of notTypes()


Examples of mage.cards.repository.CardCriteria.notTypes()

     * @param allowedColors
     * @return
     */
    public static List<Card> generateRandomCardPool(int cardsCount, List<ColoredManaSymbol> allowedColors) {
        CardCriteria criteria = new CardCriteria();
        criteria.notTypes(CardType.LAND);
        for (ColoredManaSymbol color : allowedColors) {
            switch (color) {
                case W:
                    criteria.white(true);
                    break;
View Full Code Here

Examples of mage.cards.repository.CardCriteria.notTypes()

    private static List<Card> generateSpellCardPool(int cardsCount, List<ColoredManaSymbol> allowedColors, List<String> setsToUse) {
        List<Card> spellCardPool = new ArrayList<Card>();

        CardCriteria spellCriteria = new CardCriteria();
        spellCriteria.setCodes(setsToUse.toArray(new String[0]));
        spellCriteria.notTypes(CardType.LAND);

        List<CardInfo> cardPool = CardRepository.instance.findCards(spellCriteria);
        int cardPoolCount = cardPool.size();
        Random random = new Random();
        if (cardPoolCount > 0) {
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.