diff --git a/Mage.Sets/src/mage/sets/Kaldheim.java b/Mage.Sets/src/mage/sets/Kaldheim.java index 7d135692c2..60a4837872 100644 --- a/Mage.Sets/src/mage/sets/Kaldheim.java +++ b/Mage.Sets/src/mage/sets/Kaldheim.java @@ -34,7 +34,7 @@ public final class Kaldheim extends ExpansionSet { this.numBoosterCommon = 10; this.numBoosterUncommon = 3; this.numBoosterRare = 1; - this.ratioBoosterMythic = 8; + this.ratioBoosterMythic = 7.4; this.maxCardNumberInBooster = 285; this.ratioBoosterSpecialLand = 12; this.ratioBoosterSpecialLandNumerator = 5; diff --git a/Mage.Sets/src/mage/sets/ZendikarRising.java b/Mage.Sets/src/mage/sets/ZendikarRising.java index 8bf12bbd3f..6ae423eff9 100644 --- a/Mage.Sets/src/mage/sets/ZendikarRising.java +++ b/Mage.Sets/src/mage/sets/ZendikarRising.java @@ -28,7 +28,7 @@ public final class ZendikarRising extends ExpansionSet { this.numBoosterCommon = 10; this.numBoosterUncommon = 3; this.numBoosterRare = 1; - this.ratioBoosterMythic = 8; + this.ratioBoosterMythic = 7.4; this.maxCardNumberInBooster = 280; cards.add(new SetCardInfo("Acquisitions Expert", 89, Rarity.UNCOMMON, mage.cards.a.AcquisitionsExpert.class)); diff --git a/Mage/src/main/java/mage/cards/ExpansionSet.java b/Mage/src/main/java/mage/cards/ExpansionSet.java index c8c4820a5f..50d6a311f9 100644 --- a/Mage/src/main/java/mage/cards/ExpansionSet.java +++ b/Mage/src/main/java/mage/cards/ExpansionSet.java @@ -108,7 +108,7 @@ public abstract class ExpansionSet implements Serializable { protected int numBoosterUncommon; protected int numBoosterRare; protected int numBoosterDoubleFaced; // -1 = include normally 0 = exclude 1-n = include explicit - protected int ratioBoosterMythic; + protected double ratioBoosterMythic; protected boolean hasPartnerMechanic = false; protected boolean needsLegendCreature = false; @@ -333,6 +333,10 @@ public abstract class ExpansionSet implements Serializable { return true; } + private boolean checkMythic() { + return ratioBoosterMythic > 0 && ratioBoosterMythic * RandomUtil.nextDouble() <= 1; + } + public List createPartnerBooster() { List booster = new ArrayList<>(); @@ -369,7 +373,7 @@ public abstract class ExpansionSet implements Serializable { List rares = getCardsByRarity(Rarity.RARE); List mythics = getCardsByRarity(Rarity.MYTHIC); for (int i = 0; i < numBoosterRare; i++) { - if (ratioBoosterMythic > 0 && RandomUtil.nextInt(ratioBoosterMythic) == 0) { + if (checkMythic()) { while (true) { addToBooster(booster, mythics); int check = addMissingPartner(booster, partnerAllowed, -1, 1); @@ -448,7 +452,7 @@ public abstract class ExpansionSet implements Serializable { List rares = getCardsByRarity(Rarity.RARE); List mythics = getCardsByRarity(Rarity.MYTHIC); for (int i = 0; i < numBoosterRare; i++) { - if (ratioBoosterMythic > 0 && RandomUtil.nextInt(ratioBoosterMythic) == 0) { + if (checkMythic()) { addToBooster(booster, mythics); } else { addToBooster(booster, rares);