diff --git a/Mage.Sets/src/mage/sets/Battlebond.java b/Mage.Sets/src/mage/sets/Battlebond.java index e01ffafdef..881718498c 100644 --- a/Mage.Sets/src/mage/sets/Battlebond.java +++ b/Mage.Sets/src/mage/sets/Battlebond.java @@ -15,7 +15,6 @@ public final class Battlebond extends ExpansionSet { return instance; } - private Battlebond() { super("Battlebond", "BBD", ExpansionSet.buildDate(2018, 6, 8), SetType.SUPPLEMENTAL); this.blockName = "Battlebond"; @@ -28,6 +27,8 @@ public final class Battlebond extends ExpansionSet { this.numBoosterRare = 1; this.ratioBoosterMythic = 8; + this.maxCardNumberInBooster = 254; // Don't use the 2 foil mystics copies because it would influence a random ratio + cards.add(new SetCardInfo("Aim High", 189, Rarity.UNCOMMON, mage.cards.a.AimHigh.class)); cards.add(new SetCardInfo("Angel of Retribution", 86, Rarity.UNCOMMON, mage.cards.a.AngelOfRetribution.class)); cards.add(new SetCardInfo("Angelic Chorus", 87, Rarity.RARE, mage.cards.a.AngelicChorus.class)); diff --git a/Mage/src/main/java/mage/cards/ExpansionSet.java b/Mage/src/main/java/mage/cards/ExpansionSet.java index 6d63757c9e..f187953993 100644 --- a/Mage/src/main/java/mage/cards/ExpansionSet.java +++ b/Mage/src/main/java/mage/cards/ExpansionSet.java @@ -1,5 +1,8 @@ package mage.cards; +import java.io.Serializable; +import java.util.*; +import java.util.stream.Collectors; import mage.ObjectColor; import mage.abilities.Ability; import mage.abilities.keyword.PartnerWithAbility; @@ -12,10 +15,6 @@ import mage.util.CardUtil; import mage.util.RandomUtil; import org.apache.log4j.Logger; -import java.io.Serializable; -import java.util.*; -import java.util.stream.Collectors; - /** * @author BetaSteward_at_googlemail.com */ @@ -270,8 +269,8 @@ public abstract class ExpansionSet implements Serializable { } protected boolean validateColors(List booster) { - List magicColors = - Arrays.asList(ObjectColor.WHITE, ObjectColor.BLUE, ObjectColor.BLACK, ObjectColor.RED, ObjectColor.GREEN); + List magicColors + = Arrays.asList(ObjectColor.WHITE, ObjectColor.BLUE, ObjectColor.BLACK, ObjectColor.RED, ObjectColor.GREEN); // all cards colors Map colorWeight = new HashMap<>(); @@ -354,7 +353,6 @@ public abstract class ExpansionSet implements Serializable { addToBooster(booster, commons); } - List rares = getCardsByRarity(Rarity.RARE); List mythics = getCardsByRarity(Rarity.MYTHIC); for (int i = 0; i < numBoosterRare; i++) { @@ -384,6 +382,19 @@ public abstract class ExpansionSet implements Serializable { } } } + + if (numBoosterLands > 0) { + List specialLands = getSpecialLand(); + List basicLands = getCardsByRarity(Rarity.LAND); + for (int i = 0; i < numBoosterLands; i++) { + if (ratioBoosterSpecialLand > 0 && RandomUtil.nextInt(ratioBoosterSpecialLand) < ratioBoosterSpecialLandNumerator && specialLands != null) { + addToBooster(booster, specialLands); + } else { + addToBooster(booster, basicLands); + } + } + } + return booster; }