mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 03:08:02 +00:00
The challenge rewards now honor the persistent format if enforced.
This commit is contained in:
@@ -28,6 +28,8 @@ import com.google.common.collect.Iterables;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import forge.AllZone;
|
||||||
|
import forge.Singletons;
|
||||||
import forge.card.BoosterGenerator;
|
import forge.card.BoosterGenerator;
|
||||||
import forge.card.CardRulesPredicates;
|
import forge.card.CardRulesPredicates;
|
||||||
import forge.card.CardRules;
|
import forge.card.CardRules;
|
||||||
@@ -259,6 +261,9 @@ public final class BoosterUtils {
|
|||||||
};
|
};
|
||||||
Predicate<CardPrinted> colorPred = Predicates.compose(col, CardPrinted.FN_GET_RULES);
|
Predicate<CardPrinted> colorPred = Predicates.compose(col, CardPrinted.FN_GET_RULES);
|
||||||
Predicate<CardPrinted> rarAndColor = Predicates.and(rar, colorPred);
|
Predicate<CardPrinted> rarAndColor = Predicates.and(rar, colorPred);
|
||||||
|
if (AllZone.getQuest().getFormat() != null) {
|
||||||
|
rarAndColor = Predicates.and(AllZone.getQuest().getFormat().getFilterPrinted(), rarAndColor);
|
||||||
|
}
|
||||||
return new UnOpenedProduct(openWay, new BoosterGenerator(rarAndColor)); // qty))
|
return new UnOpenedProduct(openWay, new BoosterGenerator(rarAndColor)); // qty))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user