mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +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() {
|
public Collection<PaperCard> getAllNonPromosNonReprintsNoAlt() {
|
||||||
return Lists.newArrayList(Iterables.filter(getAllCardsNoAlt(), new Predicate<PaperCard>() {
|
return Lists.newArrayList(Iterables.filter(getAllCardsNoAlt(), new Predicate<PaperCard>() {
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -78,11 +78,11 @@ public class RewardData {
|
|||||||
RewardData legals=Config.instance().getConfigData().legalCards;
|
RewardData legals=Config.instance().getConfigData().legalCards;
|
||||||
if(legals==null)
|
if(legals==null)
|
||||||
{
|
{
|
||||||
allCards = FModel.getMagicDb().getCommonCards().getUniqueCardsNoAlt();
|
allCards = FModel.getMagicDb().getCommonCards().getUniqueCardsNoAltNoOnline();
|
||||||
}
|
}
|
||||||
else
|
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>() {
|
allEnemyCards=Iterables.filter(allCards, new Predicate<PaperCard>() {
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user