Examples of rarities()


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

        Random random = new Random();
        CardCriteria criteria = new CardCriteria();
        if (!landSets.isEmpty()) {
            criteria.setCodes(landSets.toArray(new String[landSets.size()]));
        }
        criteria.rarities(Rarity.LAND).name(landName);
        List<CardInfo> lands = CardRepository.instance.findCards(criteria);
        List<Card> cards = new ArrayList<>();
        if (!lands.isEmpty()) {
            for (int i = 0; i < number; i++) {
                Card land = lands.get(random.nextInt(lands.size())).getCard();
View Full Code Here

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

    private void addDoubleFace(List<Card> booster) {
        for (int i = 0; i < numBoosterDoubleFaced; i++) {
            CardCriteria criteria = new CardCriteria();
            criteria.setCodes(this.code).doubleFaced(true);
            if (rnd.nextInt(15) < 10) {
                criteria.rarities(Rarity.COMMON);
            } else if (rnd.nextInt(5) < 4) {
                criteria.rarities(Rarity.UNCOMMON);
            } else if (rnd.nextInt(8) < 7) {
                criteria.rarities(Rarity.RARE);
            } else {
View Full Code Here

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

            CardCriteria criteria = new CardCriteria();
            criteria.setCodes(this.code).doubleFaced(true);
            if (rnd.nextInt(15) < 10) {
                criteria.rarities(Rarity.COMMON);
            } else if (rnd.nextInt(5) < 4) {
                criteria.rarities(Rarity.UNCOMMON);
            } else if (rnd.nextInt(8) < 7) {
                criteria.rarities(Rarity.RARE);
            } else {
                criteria.rarities(Rarity.MYTHIC);
            }
View Full Code Here

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

            if (rnd.nextInt(15) < 10) {
                criteria.rarities(Rarity.COMMON);
            } else if (rnd.nextInt(5) < 4) {
                criteria.rarities(Rarity.UNCOMMON);
            } else if (rnd.nextInt(8) < 7) {
                criteria.rarities(Rarity.RARE);
            } else {
                criteria.rarities(Rarity.MYTHIC);
            }
            List<CardInfo> doubleFacedCards = CardRepository.instance.findCards(criteria);
            addToBooster(booster, doubleFacedCards);
View Full Code Here

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

            } else if (rnd.nextInt(5) < 4) {
                criteria.rarities(Rarity.UNCOMMON);
            } else if (rnd.nextInt(8) < 7) {
                criteria.rarities(Rarity.RARE);
            } else {
                criteria.rarities(Rarity.MYTHIC);
            }
            List<CardInfo> doubleFacedCards = CardRepository.instance.findCards(criteria);
            addToBooster(booster, doubleFacedCards);
        }
    }
View Full Code Here

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

        CardCriteria criteria = new CardCriteria();
        if (!landSets.isEmpty()) {
            criteria.setCodes(landSets.toArray(new String[landSets.size()]));
        }
        criteria.rarities(Rarity.LAND).name(cardName);
        List<CardInfo> cards = CardRepository.instance.findCards(criteria);

        if (cards.isEmpty() && !setsToUse.isEmpty()) {
            cards = CardRepository.instance.findCards(cardName);
        }
View Full Code Here

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

        Random random = new Random();
        CardCriteria criteria = new CardCriteria();
        if (!setCodesland.isEmpty()) {
            criteria.setCodes(setCodesland.toArray(new String[setCodesland.size()]));
        }
        criteria.rarities(Rarity.LAND).name(landName);
        List<CardInfo> cards = CardRepository.instance.findCards(criteria);
        if (cards.isEmpty()) {
            return;
        }
View Full Code Here

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

    }
   
    @Override
    public List<CardInfo> getSpecialMythic() {
        CardCriteria criteria = new CardCriteria();
        criteria.rarities(Rarity.MYTHIC).setCodes(this.code).types(CardType.LAND);
        return CardRepository.instance.findCards(criteria);
    }   
     
}
View Full Code Here

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

    }

    @Override
    public List<CardInfo> getSpecialCommon() {
        CardCriteria criteria = new CardCriteria();
        criteria.rarities(Rarity.COMMON).setCodes(this.code).types(CardType.LAND);
        return CardRepository.instance.findCards(criteria);
    }

    @Override
    public List<CardInfo> getSpecialRare() {
View Full Code Here

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

    }

    @Override
    public List<CardInfo> getSpecialCommon() {
        CardCriteria criteria = new CardCriteria();
        criteria.rarities(Rarity.COMMON).setCodes(this.code);
        return CardRepository.instance.findCards(criteria);
    }

    @Override
    public List<CardInfo> getSpecialUncommon() {
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.