mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 03:38:01 +00:00
Update RewardData
- exclude Online and Funny Card for Adventure Rewards
This commit is contained in:
@@ -872,6 +872,23 @@ public final class CardDb implements ICardDatabase, IDeckGenPool {
|
||||
}));
|
||||
}
|
||||
|
||||
public Collection<PaperCard> getUniqueCardsNoAltNoOnline() {
|
||||
return Lists.newArrayList(Iterables.filter(getUniqueCardsNoAlt(), new Predicate<PaperCard>() {
|
||||
@Override
|
||||
public boolean apply(final PaperCard paperCard) {
|
||||
CardEdition edition = null;
|
||||
try {
|
||||
edition = editions.getEditionByCodeOrThrow(paperCard.getEdition());
|
||||
if (edition.getType() == Type.ONLINE||edition.getType() == Type.FUNNY)
|
||||
return false;
|
||||
} catch (Exception ex) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
public Collection<PaperCard> getAllNonPromosNonReprintsNoAlt() {
|
||||
return Lists.newArrayList(Iterables.filter(getAllCardsNoAlt(), new Predicate<PaperCard>() {
|
||||
@Override
|
||||
|
||||
@@ -78,11 +78,11 @@ public class RewardData {
|
||||
RewardData legals=Config.instance().getConfigData().legalCards;
|
||||
if(legals==null)
|
||||
{
|
||||
allCards = FModel.getMagicDb().getCommonCards().getUniqueCardsNoAlt();
|
||||
allCards = FModel.getMagicDb().getCommonCards().getUniqueCardsNoAltNoOnline();
|
||||
}
|
||||
else
|
||||
{
|
||||
allCards = Iterables.filter(FModel.getMagicDb().getCommonCards().getUniqueCardsNoAlt(), new CardUtil.CardPredicate(legals, true));
|
||||
allCards = Iterables.filter(FModel.getMagicDb().getCommonCards().getUniqueCardsNoAltNoOnline(), new CardUtil.CardPredicate(legals, true));
|
||||
}
|
||||
allEnemyCards=Iterables.filter(allCards, new Predicate<PaperCard>() {
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user