private void updateCardStats(String setCode, boolean isCardsShow) { ExpansionSet set = Sets.findSet(setCode); if (set != null) { setCaption.setText(set.getCode() + " - " + set.getName());
ExpansionSet exp = Sets.findSet(symbol); canDownload = false; if (exp != null && exp.getReleaseDate().before(compareDate)) { ExpansionSet exp = Sets.findSet(symbol); canDownload = false; if (exp != null && exp.getReleaseDate().before(compareDate)) { ExpansionSet exp = Sets.findSet(symbol); canDownload = false; if (exp != null && exp.getReleaseDate().before(compareDate)) { ExpansionSet exp = Sets.findSet(symbol); canDownload = false; if (exp != null && exp.getReleaseDate().before(compareDate)) {
@Override public final Card getSecondCardFace() { if (secondSideCardClazz == null && secondSideCard == null) { return null; } if (secondSideCard != null) { return secondSideCard; } List<ExpansionSet.SetCardInfo> cardInfo = Sets.findSet(expansionSetCode).findCardInfoByClass(secondSideCardClazz); assert cardInfo.size() == 1; // should find 1 second side card if (cardInfo.isEmpty()) { return null; } ExpansionSet.SetCardInfo info = cardInfo.get(0); return secondSideCard = createCard(secondSideCardClazz, new CardSetInfo(info.getName(), expansionSetCode, info.getCardNumber(), info.getRarity(), info.getGraphicInfo())); }
Map<String,Integer> setInfo = new LinkedHashMap<>(); for (String setCode: options.getLimitedOptions().getSetCodes()) { tournament.getSets().add(Sets.findSet(setCode)); int count = setInfo.getOrDefault(setCode, 0); setInfo.put(setCode, count + 1);
@Override public boolean apply(Game game, Ability source) { int value = source.getManaCostsToPay().getX(); // should this be random across card names, or card printings? CardCriteria criteria = new CardCriteria().types(CardType.CREATURE).convertedManaCost(value); List<CardInfo> options = CardRepository.instance.findCards(criteria); if (options == null || options.isEmpty()) { game.informPlayers("No random creature card with converted mana cost of " + value + " was found."); return false; } EmptyToken token = new EmptyToken(); // search for a non custom set creature while (!options.isEmpty()) { int index = RandomUtil.nextInt(options.size()); ExpansionSet expansionSet = Sets.findSet(options.get(index).getSetCode()); if (expansionSet == null || expansionSet.getSetType() == SetType.CUSTOM_SET) { options.remove(index); } else { Card card = options.get(index).getCard(); if (card != null) { CardUtil.copyTo(token).from(card); break; } else { options.remove(index); } } } token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId(), false, false); return true; } }
ExpansionSet expansionSet = Sets.findSet(setChosen); if (expansionSet != null) { List<Card> boosterPack = expansionSet.create15CardBooster();
ExpansionSet expansionSet = Sets.findSet(setChosen); if (expansionSet != null) { List<Card> boosterPack = expansionSet.create15CardBooster();