diff --git a/forge-gui-mobile/src/forge/adventure/data/AdventureEventData.java b/forge-gui-mobile/src/forge/adventure/data/AdventureEventData.java index d6246d1381a..266eaddf722 100644 --- a/forge-gui-mobile/src/forge/adventure/data/AdventureEventData.java +++ b/forge-gui-mobile/src/forge/adventure/data/AdventureEventData.java @@ -197,7 +197,11 @@ public class AdventureEventData implements Serializable { ConfigData configData = Config.instance().getConfigData(); Predicate filter = CardEdition.Predicates.CAN_MAKE_BOOSTER.and(selectSetPool()); - if(configData.restrictedEvents != null) { + if(configData.allowedEvents != null) { + Set allowedEvents = Set.of(configData.allowedEvents); + filter = filter.and(q -> allowedEvents.contains(q.getCode())); + } + else if(configData.restrictedEvents != null) { //Temporary restriction until rewards are more diverse - don't want to award restricted cards so these editions need different rewards added. //Also includes sets that use conspiracy or commander drafts. Set restrictedEvents = Set.of(configData.restrictedEvents); @@ -206,7 +210,7 @@ public class AdventureEventData implements Serializable { if (configData.allowedEditions != null) { Set allowed = Set.of(configData.allowedEditions); filter = filter.and(q -> allowed.contains(q.getCode())); - } else { + } else if(configData.restrictedEditions != null) { List restrictedList = Arrays.asList(configData.restrictedEditions); Set restricted = new HashSet<>(restrictedList); //Would use Set.of but that throws an error if there's any duplicates, and users edit these lists all the time. filter = filter.and(q -> !restricted.contains(q.getCode())); diff --git a/forge-gui-mobile/src/forge/adventure/data/ConfigData.java b/forge-gui-mobile/src/forge/adventure/data/ConfigData.java index c5b2a78ba32..c7df86452eb 100644 --- a/forge-gui-mobile/src/forge/adventure/data/ConfigData.java +++ b/forge-gui-mobile/src/forge/adventure/data/ConfigData.java @@ -24,5 +24,6 @@ public class ConfigData { public String[] restrictedEditions; public String[] allowedEditions; public String[] restrictedEvents; + public String[] allowedEvents; public String[] allowedJumpstart; }