diff --git a/forge-core/src/main/java/forge/card/BoosterGenerator.java b/forge-core/src/main/java/forge/card/BoosterGenerator.java index b9f6375cb21..3340224ba52 100644 --- a/forge-core/src/main/java/forge/card/BoosterGenerator.java +++ b/forge-core/src/main/java/forge/card/BoosterGenerator.java @@ -61,9 +61,9 @@ public class BoosterGenerator { List sheetsUsed = new ArrayList(); CardEdition edition = StaticData.instance().getEditions().get(template.getEdition()); - boolean hasFoil = edition != null && MyRandom.getRandom().nextDouble() < edition.getFoilChanceInBooster() && edition.getFoilType() != FoilType.NOT_SUPPORTED; + boolean hasFoil = edition != null && !template.getSlots().isEmpty() && MyRandom.getRandom().nextDouble() < edition.getFoilChanceInBooster() && edition.getFoilType() != FoilType.NOT_SUPPORTED; boolean foilAtEndOfPack = hasFoil && edition.getFoilAlwaysInCommonSlot(); - String foilSlot = (template.getSlots().isEmpty() || !hasFoil) ? null : foilAtEndOfPack ? BoosterSlots.COMMON : Aggregates.random(template.getSlots()).getKey(); + String foilSlot = !hasFoil ? null : foilAtEndOfPack ? BoosterSlots.COMMON : Aggregates.random(template.getSlots()).getKey(); for(Pair slot : template.getSlots()) { String slotType = slot.getLeft(); // add expansion symbol here?