From 901ed68e8ab36e98413d40b31a3c082d79851566 Mon Sep 17 00:00:00 2001 From: "Alex W. Jackson" Date: Thu, 14 Oct 2021 07:03:40 -0400 Subject: [PATCH] Implement collation for M14, THS, BNG, JOU, M15 and KTK --- Mage.Sets/src/mage/sets/BornOfTheGods.java | 58 +++++++++- Mage.Sets/src/mage/sets/JourneyIntoNyx.java | 58 +++++++++- Mage.Sets/src/mage/sets/KhansOfTarkir.java | 117 ++++++++++++++++++- Mage.Sets/src/mage/sets/Magic2014.java | 104 +++++++++++++++++ Mage.Sets/src/mage/sets/Magic2015.java | 118 +++++++++++++++++++- Mage.Sets/src/mage/sets/Theros.java | 104 ++++++++++++++++- 6 files changed, 554 insertions(+), 5 deletions(-) diff --git a/Mage.Sets/src/mage/sets/BornOfTheGods.java b/Mage.Sets/src/mage/sets/BornOfTheGods.java index 5bcb1357669..09aca8d09cf 100644 --- a/Mage.Sets/src/mage/sets/BornOfTheGods.java +++ b/Mage.Sets/src/mage/sets/BornOfTheGods.java @@ -1,10 +1,16 @@ - package mage.sets; import mage.cards.ExpansionSet; +import mage.collation.BoosterCollator; +import mage.collation.BoosterStructure; +import mage.collation.CardRun; +import mage.collation.RarityConfiguration; import mage.constants.Rarity; import mage.constants.SetType; +import java.util.ArrayList; +import java.util.List; + /** * * @author LevelX2 @@ -195,4 +201,54 @@ public final class BornOfTheGods extends ExpansionSet { cards.add(new SetCardInfo("Xenagos, God of Revels", 156, Rarity.MYTHIC, mage.cards.x.XenagosGodOfRevels.class)); } + @Override + public BoosterCollator createCollator() { + return new BornOfTheGodsCollator(); + } +} + +// Booster collation info from https://www.lethe.xyz/mtg/collation/bng.html +// Using USA collation for common/uncommon, rare collation inferred from other sets +class BornOfTheGodsCollator implements BoosterCollator { + private final CardRun commonA = new CardRun(true, "131", "38", "91", "82", "15", "136", "49", "78", "89", "20", "67", "46", "142", "91", "18", "76", "131", "41", "107", "16", "78", "118", "104", "51", "9", "139", "72", "10", "110", "33", "70", "142", "16", "67", "38", "95", "18", "139", "86", "51", "85", "25", "110", "118", "41", "70", "9", "89", "138", "76", "33", "20", "95", "82", "136", "104", "49", "15", "86", "138", "10", "107", "46", "85", "72", "25"); + private final CardRun commonB = new CardRun(true, "99", "120", "77", "100", "19", "8", "127", "60", "3", "106", "141", "45", "90", "77", "53", "100", "117", "127", "36", "3", "64", "99", "134", "35", "34", "106", "74", "141", "8", "22", "36", "102", "125", "52", "21", "134", "60", "93", "90", "34", "120", "19", "74", "102", "53", "117", "64", "35", "21", "93", "125", "22", "52", "45"); + private final CardRun uncommonA = new CardRun(true, "12", "158", "54", "2", "71", "132", "4", "114", "30", "162", "62", "116", "158", "50", "112", "23", "54", "140", "71", "12", "2", "29", "47", "143", "160", "109", "79", "162", "42", "112", "146", "133", "23", "47", "59", "113", "150", "116", "154", "30", "83", "88", "146", "160", "32", "87", "109", "143", "59", "50", "150", "114", "154", "132", "79", "32", "113", "4", "140", "83", "87", "29", "42", "88", "62", "133"); + private final CardRun uncommonB = new CardRun(true, "14", "37", "65", "130", "111", "147", "6", "161", "58", "122", "43", "40", "92", "28", "128", "65", "153", "56", "105", "135", "1", "61", "43", "101", "155", "128", "13", "81", "37", "126", "92", "14", "58", "56", "28", "161", "135", "84", "147", "130", "1", "105", "155", "6", "81", "126", "153", "111", "84", "13", "122", "40", "101", "61"); + private final CardRun rare = new CardRun(false, "7", "11", "17", "24", "26", "27", "31", "39", "44", "48", "55", "57", "66", "68", "69", "73", "75", "80", "94", "96", "98", "103", "108", "115", "119", "121", "123", "124", "129", "137", "157", "159", "163", "164", "165", "7", "11", "17", "24", "26", "27", "31", "39", "44", "48", "55", "57", "66", "68", "69", "73", "75", "80", "94", "96", "98", "103", "108", "115", "119", "121", "123", "124", "129", "137", "157", "159", "163", "164", "165", "5", "63", "97", "144", "145", "148", "149", "151", "152", "156"); + private final CardRun land = new CardRun(false, "THS_230", "THS_231", "THS_232", "THS_233", "THS_234", "THS_235", "THS_236", "THS_237", "THS_238", "THS_239", "THS_240", "THS_241", "THS_242", "THS_243", "THS_244", "THS_245", "THS_246", "THS_247", "THS_248", "THS_249"); + + private final BoosterStructure AAAAABBBBB = new BoosterStructure( + commonA, commonA, commonA, commonA, commonA, + commonB, commonB, commonB, commonB, commonB + ); + private final BoosterStructure AAAAAABBBB = new BoosterStructure( + commonA, commonA, commonA, commonA, commonA, commonA, + commonB, commonB, commonB, commonB + ); + private final BoosterStructure AAB = new BoosterStructure(uncommonA, uncommonA, uncommonB); + private final BoosterStructure ABB = new BoosterStructure(uncommonA, uncommonB, uncommonB); + private final BoosterStructure R1 = new BoosterStructure(rare); + private final BoosterStructure L1 = new BoosterStructure(land); + + private final RarityConfiguration commonRuns = new RarityConfiguration(AAAAABBBBB, AAAAAABBBB); + // In order for equal numbers of each uncommon to exist, the average booster must contain: + // 1.65 A uncommons (33 / 20) + // 1.35 B uncommons (27 / 20) + // These numbers are the same for all sets with 60 uncommons in asymmetrical A/B print runs + private final RarityConfiguration uncommonRuns = new RarityConfiguration( + AAB, AAB, AAB, AAB, AAB, AAB, AAB, AAB, AAB, AAB, AAB, AAB, AAB, + ABB, ABB, ABB, ABB, ABB, ABB, ABB + ); + private final RarityConfiguration rareRuns = new RarityConfiguration(R1); + private final RarityConfiguration landRuns = new RarityConfiguration(L1); + + @Override + public List makeBooster() { + List booster = new ArrayList<>(); + booster.addAll(commonRuns.getNext().makeRun()); + booster.addAll(uncommonRuns.getNext().makeRun()); + booster.addAll(rareRuns.getNext().makeRun()); + booster.addAll(landRuns.getNext().makeRun()); + return booster; + } } diff --git a/Mage.Sets/src/mage/sets/JourneyIntoNyx.java b/Mage.Sets/src/mage/sets/JourneyIntoNyx.java index 7c41e6f6f1e..92d57dc49f7 100644 --- a/Mage.Sets/src/mage/sets/JourneyIntoNyx.java +++ b/Mage.Sets/src/mage/sets/JourneyIntoNyx.java @@ -1,10 +1,16 @@ - package mage.sets; import mage.cards.ExpansionSet; +import mage.collation.BoosterCollator; +import mage.collation.BoosterStructure; +import mage.collation.CardRun; +import mage.collation.RarityConfiguration; import mage.constants.Rarity; import mage.constants.SetType; +import java.util.ArrayList; +import java.util.List; + /** * * @author LevelX2 @@ -195,4 +201,54 @@ public final class JourneyIntoNyx extends ExpansionSet { cards.add(new SetCardInfo("Worst Fears", 87, Rarity.MYTHIC, mage.cards.w.WorstFears.class)); } + @Override + public BoosterCollator createCollator() { + return new JourneyIntoNyxCollator(); + } +} + +// Booster collation info from https://www.lethe.xyz/mtg/collation/jou.html +// Using USA collation for common/uncommon, rare collation inferred from other sets +class JourneyIntoNyxCollator implements BoosterCollator { + private final CardRun commonA = new CardRun(true, "14", "133", "71", "38", "103", "13", "124", "79", "33", "105", "4", "123", "81", "39", "109", "11", "133", "69", "41", "110", "3", "127", "71", "30", "103", "9", "123", "78", "38", "111", "2", "124", "69", "32", "102", "14", "130", "81", "41", "105", "3", "131", "77", "39", "111", "11", "129", "78", "33", "102", "9", "130", "73", "32", "109", "4", "127", "77", "13", "79", "129", "2", "131", "73", "30", "110"); + private final CardRun commonB = new CardRun(true, "19", "45", "137", "96", "53", "99", "52", "114", "64", "27", "49", "134", "90", "67", "28", "53", "120", "95", "63", "20", "56", "136", "97", "60", "17", "45", "134", "99", "61", "19", "57", "139", "96", "67", "27", "56", "137", "90", "64", "17", "52", "120", "114", "63", "28", "49", "139", "97", "61", "20", "57", "136", "95", "60"); + private final CardRun uncommonA = new CardRun(true, "147", "84", "119", "159", "34", "107", "29", "116", "118", "22", "148", "40", "85", "23", "149", "108", "26", "86", "159", "44", "158", "58", "148", "76", "24", "35", "147", "125", "80", "26", "34", "104", "113", "132", "44", "118", "83", "29", "43", "21", "125", "23", "86", "104", "158", "107", "85", "149", "113", "58", "117", "84", "116", "119", "83", "40", "22", "35", "132", "24", "80", "43", "108", "21", "76", "117"); + private final CardRun uncommonB = new CardRun(true, "138", "72", "55", "161", "10", "54", "70", "48", "142", "88", "156", "59", "141", "98", "160", "62", "101", "138", "161", "54", "72", "47", "153", "18", "55", "59", "91", "144", "5", "62", "88", "16", "48", "98", "153", "141", "92", "144", "157", "101", "47", "143", "10", "160", "70", "16", "91", "156", "142", "5", "157", "92", "18", "143"); + private final CardRun rare = new CardRun(false, "1", "6", "7", "8", "15", "25", "31", "36", "37", "42", "46", "51", "65", "66", "68", "74", "75", "82", "89", "93", "94", "100", "112", "115", "121", "122", "126", "128", "135", "140", "155", "162", "163", "164", "165", "1", "6", "7", "8", "15", "25", "31", "36", "37", "42", "46", "51", "65", "66", "68", "74", "75", "82", "89", "93", "94", "100", "112", "115", "121", "122", "126", "128", "135", "140", "155", "162", "163", "164", "165", "12", "50", "87", "106", "145", "146", "150", "151", "152", "154"); + private final CardRun land = new CardRun(false, "THS_230", "THS_231", "THS_232", "THS_233", "THS_234", "THS_235", "THS_236", "THS_237", "THS_238", "THS_239", "THS_240", "THS_241", "THS_242", "THS_243", "THS_244", "THS_245", "THS_246", "THS_247", "THS_248", "THS_249"); + + private final BoosterStructure AAAAABBBBB = new BoosterStructure( + commonA, commonA, commonA, commonA, commonA, + commonB, commonB, commonB, commonB, commonB + ); + private final BoosterStructure AAAAAABBBB = new BoosterStructure( + commonA, commonA, commonA, commonA, commonA, commonA, + commonB, commonB, commonB, commonB + ); + private final BoosterStructure AAB = new BoosterStructure(uncommonA, uncommonA, uncommonB); + private final BoosterStructure ABB = new BoosterStructure(uncommonA, uncommonB, uncommonB); + private final BoosterStructure R1 = new BoosterStructure(rare); + private final BoosterStructure L1 = new BoosterStructure(land); + + private final RarityConfiguration commonRuns = new RarityConfiguration(AAAAABBBBB, AAAAAABBBB); + // In order for equal numbers of each uncommon to exist, the average booster must contain: + // 1.65 A uncommons (33 / 20) + // 1.35 B uncommons (27 / 20) + // These numbers are the same for all sets with 60 uncommons in asymmetrical A/B print runs + private final RarityConfiguration uncommonRuns = new RarityConfiguration( + AAB, AAB, AAB, AAB, AAB, AAB, AAB, AAB, AAB, AAB, AAB, AAB, AAB, + ABB, ABB, ABB, ABB, ABB, ABB, ABB + ); + private final RarityConfiguration rareRuns = new RarityConfiguration(R1); + private final RarityConfiguration landRuns = new RarityConfiguration(L1); + + @Override + public List makeBooster() { + List booster = new ArrayList<>(); + booster.addAll(commonRuns.getNext().makeRun()); + booster.addAll(uncommonRuns.getNext().makeRun()); + booster.addAll(rareRuns.getNext().makeRun()); + booster.addAll(landRuns.getNext().makeRun()); + return booster; + } } diff --git a/Mage.Sets/src/mage/sets/KhansOfTarkir.java b/Mage.Sets/src/mage/sets/KhansOfTarkir.java index 101aa00c42a..87936ce2ef6 100644 --- a/Mage.Sets/src/mage/sets/KhansOfTarkir.java +++ b/Mage.Sets/src/mage/sets/KhansOfTarkir.java @@ -1,10 +1,16 @@ - package mage.sets; import mage.cards.ExpansionSet; +import mage.collation.BoosterCollator; +import mage.collation.BoosterStructure; +import mage.collation.CardRun; +import mage.collation.RarityConfiguration; import mage.constants.Rarity; import mage.constants.SetType; +import java.util.ArrayList; +import java.util.List; + /** * * @author LevelX2 @@ -298,4 +304,113 @@ public final class KhansOfTarkir extends ExpansionSet { cards.add(new SetCardInfo("Zurgo Helmsmasher", 214, Rarity.MYTHIC, mage.cards.z.ZurgoHelmsmasher.class)); } + @Override + public BoosterCollator createCollator() { + return new KhansOfTarkirCollator(); + } +} + +// Booster collation info from https://www.lethe.xyz/mtg/collation/ktk.html +// Using USA collation for all rarities +// Foil rare sheet used for regular rares as regular rare sheet is not known +class KhansOfTarkirCollator implements BoosterCollator { + private final CardRun commonA = new CardRun(true, "37", "105", "24", "59", "98", "17", "41", "120", "11", "62", "125", "9", "57", "124", "3", "63", "117", "7", "35", "96", "10", "33", "100", "16", "47", "114", "19", "37", "122", "20", "61", "101", "24", "41", "105", "21", "52", "98", "17", "63", "120", "3", "62", "125", "11", "47", "114", "16", "59", "117", "9", "57", "100", "20", "35", "96", "7", "52", "101", "10", "33", "122", "19", "61", "124", "21"); + private final CardRun commonB = new CardRun(true, "91", "129", "71", "137", "70", "128", "86", "131", "80", "158", "77", "139", "78", "132", "87", "147", "68", "151", "90", "129", "65", "146", "71", "128", "70", "127", "91", "137", "86", "131", "80", "158", "77", "132", "65", "139", "87", "128", "71", "147", "68", "151", "91", "137", "86", "146", "78", "129", "80", "131", "90", "127", "87", "151", "70", "158", "65", "139", "78", "132", "68", "146", "77", "147", "90", "127"); + private final CardRun commonC1 = new CardRun(true, "215", "39", "232", "123", "175", "29", "229", "48", "121", "225", "4", "244", "44", "201", "95", "247", "15", "226", "40", "103", "240", "14", "159", "55", "232", "102", "223", "29", "242", "39", "95", "175", "23", "244", "44", "215", "123", "229", "4", "159", "48", "121", "240", "15", "225", "40", "247", "103", "201", "23", "226", "55", "102", "242", "14"); + private final CardRun commonC2 = new CardRun(true, "94", "135", "246", "84", "222", "142", "231", "76", "191", "140", "243", "93", "148", "223", "89", "235", "135", "162", "94", "155", "246", "84", "224", "142", "231", "93", "191", "148", "222", "76", "140", "235", "94", "224", "135", "243", "76", "162", "155", "246", "89", "222", "142", "235", "84", "191", "140", "231", "93", "148", "224", "89", "243", "155", "162"); + private final CardRun uncommonA = new CardRun(true, "32", "170", "27", "97", "169", "1", "56", "28", "51", "104", "213", "111", "188", "115", "32", "109", "27", "56", "97", "6", "107", "46", "1", "183", "115", "5", "213", "28", "116", "169", "104", "53", "188", "97", "183", "46", "111", "5", "51", "213", "109", "1", "53", "170", "116", "6", "46", "188", "107", "27", "51", "115", "28", "32", "169", "111", "170", "56", "109", "5", "116", "53", "107", "183", "104", "6"); + private final CardRun uncommonB = new CardRun(true, "161", "88", "145", "208", "130", "186", "138", "79", "218", "75", "238", "150", "64", "161", "74", "152", "88", "217", "165", "130", "181", "143", "92", "238", "79", "208", "75", "145", "236", "74", "138", "181", "241", "150", "161", "79", "152", "64", "217", "130", "238", "143", "218", "165", "241", "74", "208", "186", "152", "181", "88", "236", "92", "138", "218", "64", "145", "165", "143", "186", "241", "75", "150", "92", "217", "236"); + private final CardRun uncommonC = new CardRun(true, "194", "60", "26", "110", "118", "198", "30", "126", "177", "50", "2", "38", "194", "25", "178", "26", "172", "30", "54", "22", "177", "110", "198", "126", "43", "178", "38", "25", "50", "26", "194", "30", "118", "60", "172", "54", "110", "2", "198", "38", "22", "177", "43", "25", "60", "118", "50", "178", "54", "2", "126", "172", "43", "22"); + private final CardRun uncommonD = new CardRun(true, "67", "228", "212", "234", "81", "156", "205", "134", "245", "204", "221", "153", "187", "69", "167", "228", "212", "234", "134", "83", "81", "245", "153", "67", "156", "237", "167", "221", "187", "212", "69", "204", "157", "245", "205", "67", "134", "167", "83", "237", "153", "69", "228", "157", "234", "187", "156", "221", "81", "205", "83", "204", "237", "157"); + private final CardRun rare = new CardRun(true, "214", "18", "163", "108", "209", "219", "180", "73", "164", "141", "166", "133", "210", "248", "85", "206", "42", "173", "31", "182", "230", "195", "113", "203", "133", "199", "249", "211", "219", "197", "34", "171", "12", "106", "192", "149", "179", "8", "233", "202", "82", "112", "211", "42", "230", "196", "106", "173", "239", "174", "216", "185", "13", "171", "36", "144", "184", "119", "164", "233", "192", "73", "168", "49", "174", "13", "249", "179", "108", "18", "190", "58", "200", "220", "193", "112", "239", "196", "45", "160", "248", "168", "113", "176", "66", "58", "193", "154", "200", "8", "160", "36", "185", "82", "184", "220", "207", "141", "182", "227", "189", "154", "210", "85", "180", "216", "203", "45", "166", "99", "207", "72", "209", "136", "176", "144", "197", "12", "189", "66", "195"); + private final CardRun land = new CardRun(false, "250", "251", "252", "253", "254", "255", "256", "257", "258", "259", "260", "261", "262", "263", "264", "265", "266", "267", "268", "269"); + + private final BoosterStructure AABBC1C1C1C1C1C1 = new BoosterStructure( + commonA, commonA, + commonB, commonB, + commonC1, commonC1, commonC1, commonC1, commonC1, commonC1 + ); + private final BoosterStructure AAABBC1C1C1C1C1 = new BoosterStructure( + commonA, commonA, commonA, + commonB, commonB, + commonC1, commonC1, commonC1, commonC1, commonC1 + ); + private final BoosterStructure AAAABBC2C2C2C2 = new BoosterStructure( + commonA, commonA, commonA, commonA, + commonB, commonB, + commonC2, commonC2, commonC2, commonC2 + ); + private final BoosterStructure AAAABBBC2C2C2 = new BoosterStructure( + commonA, commonA, commonA, commonA, + commonB, commonB, commonB, + commonC2, commonC2, commonC2 + ); + private final BoosterStructure AAAABBBBC2C2 = new BoosterStructure( + commonA, commonA, commonA, commonA, + commonB, commonB, commonB, commonB, + commonC2, commonC2 + ); + private final BoosterStructure ABC = new BoosterStructure(uncommonA, uncommonB, uncommonC); + private final BoosterStructure ABD = new BoosterStructure(uncommonA, uncommonB, uncommonD); + private final BoosterStructure ACD = new BoosterStructure(uncommonA, uncommonC, uncommonD); + private final BoosterStructure BCD = new BoosterStructure(uncommonB, uncommonC, uncommonD); + private final BoosterStructure R1 = new BoosterStructure(rare); + private final BoosterStructure L1 = new BoosterStructure(land); + + // In order for equal numbers of each common to exist, the average booster must contain: + // 3.27 A commons (36 / 11) + // 2.18 B commons (24 / 11) + // 2.73 C1 commons (30 / 11, or 60 / 11 in each C1 booster) + // 1.82 C2 commons (20 / 11, or 40 / 11 in each C2 booster) + // These numbers are the same for all sets with 101 commons in A/B/C1/C2 print runs + // and with 10 common slots per booster + private final RarityConfiguration commonRuns = new RarityConfiguration( + AABBC1C1C1C1C1C1, + AABBC1C1C1C1C1C1, + AABBC1C1C1C1C1C1, + AABBC1C1C1C1C1C1, + AABBC1C1C1C1C1C1, + AAABBC1C1C1C1C1, + AAABBC1C1C1C1C1, + AAABBC1C1C1C1C1, + AAABBC1C1C1C1C1, + AAABBC1C1C1C1C1, + AAABBC1C1C1C1C1, + + AAAABBC2C2C2C2, + AAAABBC2C2C2C2, + AAAABBC2C2C2C2, + AAAABBC2C2C2C2, + AAAABBC2C2C2C2, + AAAABBC2C2C2C2, + AAAABBC2C2C2C2, + AAAABBC2C2C2C2, + AAAABBBC2C2C2, + AAAABBBC2C2C2, + AAAABBBBC2C2 + ); + // In order for equal numbers of each uncommon to exist, the average booster must contain: + // 0.825 A uncommons (33 / 40) + // 0.825 B uncommons (33 / 40) + // 0.675 C uncommons (27 / 40) + // 0.675 D uncommons (27 / 40) + // These numbers are the same for all sets with 80 uncommons in asymmetrical A/B/C/D print runs + private final RarityConfiguration uncommonRuns = new RarityConfiguration( + ABC, ABD, ABC, ABD, ABC, ABD, ABC, ABD, ABC, ABD, ABC, ABD, ABC, + ABD, ABC, ABD, ABC, ABD, ABC, ABD, ABC, ABD, ABC, ABD, ABC, ABD, + ACD, BCD, ACD, BCD, ACD, BCD, ACD, + BCD, ACD, BCD, ACD, BCD, ACD, BCD + ); + private final RarityConfiguration rareRuns = new RarityConfiguration(R1); + private final RarityConfiguration landRuns = new RarityConfiguration(L1); + + @Override + public List makeBooster() { + List booster = new ArrayList<>(); + booster.addAll(commonRuns.getNext().makeRun()); + booster.addAll(uncommonRuns.getNext().makeRun()); + booster.addAll(rareRuns.getNext().makeRun()); + booster.addAll(landRuns.getNext().makeRun()); + return booster; + } } diff --git a/Mage.Sets/src/mage/sets/Magic2014.java b/Mage.Sets/src/mage/sets/Magic2014.java index be6793a89bd..3ab71f70a04 100644 --- a/Mage.Sets/src/mage/sets/Magic2014.java +++ b/Mage.Sets/src/mage/sets/Magic2014.java @@ -1,9 +1,16 @@ package mage.sets; import mage.cards.ExpansionSet; +import mage.collation.BoosterCollator; +import mage.collation.BoosterStructure; +import mage.collation.CardRun; +import mage.collation.RarityConfiguration; import mage.constants.Rarity; import mage.constants.SetType; +import java.util.ArrayList; +import java.util.List; + /** * * @author North @@ -274,4 +281,101 @@ public final class Magic2014 extends ExpansionSet { cards.add(new SetCardInfo("Young Pyromancer", 163, Rarity.UNCOMMON, mage.cards.y.YoungPyromancer.class)); cards.add(new SetCardInfo("Zephyr Charge", 82, Rarity.COMMON, mage.cards.z.ZephyrCharge.class)); } + + @Override + public BoosterCollator createCollator() { + return new Magic2014Collator(); + } +} + +// Booster collation info from https://www.lethe.xyz/mtg/collation/m14.html +// Using USA collation for all rarities +// Foil rare sheet used for regular rares as regular rare sheet is not known +class Magic2014Collator implements BoosterCollator { + private final CardRun commonA = new CardRun(true, "119", "149", "199", "89", "4", "171", "152", "52", "98", "24", "74", "156", "191", "83", "56", "30", "114", "145", "197", "186", "4", "87", "156", "64", "89", "183", "11", "55", "152", "119", "56", "188", "24", "155", "114", "74", "37", "199", "46", "145", "90", "40", "98", "191", "149", "55", "183", "37", "83", "135", "64", "186", "82", "30", "87", "155", "46", "171", "197", "11", "90", "135", "52", "188", "40", "82"); + private final CardRun commonB = new CardRun(true, "192", "63", "34", "136", "43", "175", "144", "121", "15", "65", "92", "179", "133", "150", "193", "43", "97", "34", "144", "167", "121", "63", "92", "33", "136", "175", "44", "193", "15", "97", "143", "122", "167", "150", "27", "121", "65", "179", "136", "192", "33", "133", "92", "175", "122", "27", "193", "143", "144", "65", "192", "15", "44", "150", "63", "179", "34", "33", "143", "43", "167", "97", "27", "44", "133", "122"); + private final CardRun commonC1 = new CardRun(true, "17", "104", "106", "168", "157", "12", "176", "76", "84", "138", "21", "164", "218", "69", "110", "124", "36", "189", "62", "105", "129", "25", "19", "169", "116", "49", "157", "70", "36", "110", "17", "176", "138", "62", "104", "84", "25", "168", "124", "49", "106", "21", "169", "142", "69", "105", "12", "164", "76", "129", "116", "19", "189", "70", "142"); + private final CardRun commonC2 = new CardRun(true, "131", "20", "75", "107", "71", "125", "6", "45", "174", "28", "94", "161", "51", "196", "75", "131", "107", "20", "71", "174", "159", "28", "109", "45", "94", "161", "131", "13", "196", "177", "20", "159", "218", "6", "51", "109", "125", "174", "75", "13", "177", "107", "159", "45", "71", "196", "6", "94", "125", "161", "28", "177", "109", "13", "51"); + private final CardRun uncommonA = new CardRun(true, "217", "153", "184", "219", "120", "32", "227", "147", "182", "213", "91", "7", "229", "72", "207", "200", "86", "41", "160", "223", "204", "184", "66", "59", "139", "229", "38", "91", "219", "166", "147", "205", "120", "220", "86", "204", "213", "7", "203", "118", "58", "160", "59", "210", "207", "38", "166", "72", "99", "153", "223", "205", "182", "66", "227", "217", "58", "210", "203", "32", "139", "118", "220", "200", "99", "41"); + private final CardRun uncommonB = new CardRun(true, "170", "79", "14", "128", "85", "201", "137", "42", "39", "178", "226", "163", "96", "209", "10", "67", "221", "127", "170", "80", "8", "95", "178", "79", "140", "10", "222", "113", "3", "165", "128", "67", "209", "85", "14", "78", "140", "42", "95", "39", "222", "137", "80", "113", "201", "163", "8", "226", "78", "96", "127", "3", "221", "165"); + private final CardRun rare = new CardRun(true, "228", "9", "117", "216", "172", "146", "208", "132", "100", "23", "134", "47", "185", "126", "93", "5", "173", "26", "111", "81", "148", "208", "61", "35", "225", "195", "54", "108", "2", "103", "47", "141", "29", "68", "53", "162", "194", "212", "117", "50", "31", "185", "77", "151", "18", "134", "48", "130", "202", "215", "180", "187", "148", "73", "29", "198", "53", "211", "195", "50", "93", "68", "108", "214", "9", "126", "31", "101", "130", "158", "202", "224", "187", "123", "154", "100", "16", "60", "88", "77", "141", "103", "146", "228", "194", "73", "158", "22", "112", "57", "2", "35", "215", "198", "173", "211", "224", "101", "123", "206", "48", "112", "54", "162", "26", "88", "102", "214", "22", "190", "18", "181", "212", "1", "61", "23", "225", "115", "154", "57", "180"); + private final CardRun land = new CardRun(false, "230", "231", "232", "233", "234", "235", "236", "237", "238", "239", "240", "241", "242", "243", "244", "245", "246", "247", "248", "249"); + + private final BoosterStructure AABBC1C1C1C1C1C1 = new BoosterStructure( + commonA, commonA, + commonB, commonB, + commonC1, commonC1, commonC1, commonC1, commonC1, commonC1 + ); + private final BoosterStructure AAABBC1C1C1C1C1 = new BoosterStructure( + commonA, commonA, commonA, + commonB, commonB, + commonC1, commonC1, commonC1, commonC1, commonC1 + ); + private final BoosterStructure AAAABBC2C2C2C2 = new BoosterStructure( + commonA, commonA, commonA, commonA, + commonB, commonB, + commonC2, commonC2, commonC2, commonC2 + ); + private final BoosterStructure AAAABBBBC2C2 = new BoosterStructure( + commonA, commonA, commonA, commonA, + commonB, commonB, commonB, commonB, + commonC2, commonC2 + ); + private final BoosterStructure AAB = new BoosterStructure(uncommonA, uncommonA, uncommonB); + private final BoosterStructure ABB = new BoosterStructure(uncommonA, uncommonB, uncommonB); + private final BoosterStructure R1 = new BoosterStructure(rare); + private final BoosterStructure L1 = new BoosterStructure(land); + + // In order for equal numbers of each common to exist, the average booster must contain: + // 3.27 A commons (36 / 11) + // 2.18 B commons (24 / 11) + // 2.73 C1 commons (30 / 11, or 60 / 11 in each C1 booster) + // 1.82 C2 commons (20 / 11, or 40 / 11 in each C2 booster) + // These numbers are the same for all sets with 101 commons in A/B/C1/C2 print runs + // and with 10 common slots per booster + private final RarityConfiguration commonRuns = new RarityConfiguration( + AABBC1C1C1C1C1C1, + AABBC1C1C1C1C1C1, + AABBC1C1C1C1C1C1, + AABBC1C1C1C1C1C1, + AABBC1C1C1C1C1C1, + AAABBC1C1C1C1C1, + AAABBC1C1C1C1C1, + AAABBC1C1C1C1C1, + AAABBC1C1C1C1C1, + AAABBC1C1C1C1C1, + AAABBC1C1C1C1C1, + + AAAABBC2C2C2C2, + AAAABBC2C2C2C2, + AAAABBC2C2C2C2, + AAAABBC2C2C2C2, + AAAABBC2C2C2C2, + AAAABBC2C2C2C2, + AAAABBC2C2C2C2, + AAAABBC2C2C2C2, + AAAABBC2C2C2C2, + AAAABBBBC2C2, + AAAABBBBC2C2 + ); + // In order for equal numbers of each uncommon to exist, the average booster must contain: + // 1.65 A uncommons (33 / 20) + // 1.35 B uncommons (27 / 20) + // These numbers are the same for all sets with 60 uncommons in asymmetrical A/B print runs + private final RarityConfiguration uncommonRuns = new RarityConfiguration( + AAB, AAB, AAB, AAB, AAB, AAB, AAB, AAB, AAB, AAB, AAB, AAB, AAB, + ABB, ABB, ABB, ABB, ABB, ABB, ABB + ); + private final RarityConfiguration rareRuns = new RarityConfiguration(R1); + private final RarityConfiguration landRuns = new RarityConfiguration(L1); + + @Override + public List makeBooster() { + List booster = new ArrayList<>(); + booster.addAll(commonRuns.getNext().makeRun()); + booster.addAll(uncommonRuns.getNext().makeRun()); + booster.addAll(rareRuns.getNext().makeRun()); + booster.addAll(landRuns.getNext().makeRun()); + return booster; + } } diff --git a/Mage.Sets/src/mage/sets/Magic2015.java b/Mage.Sets/src/mage/sets/Magic2015.java index b35d136022a..90915cd6dd5 100644 --- a/Mage.Sets/src/mage/sets/Magic2015.java +++ b/Mage.Sets/src/mage/sets/Magic2015.java @@ -1,10 +1,16 @@ - package mage.sets; import mage.cards.ExpansionSet; +import mage.collation.BoosterCollator; +import mage.collation.BoosterStructure; +import mage.collation.CardRun; +import mage.collation.RarityConfiguration; import mage.constants.Rarity; import mage.constants.SetType; +import java.util.ArrayList; +import java.util.List; + /** * * @author LevelX2 @@ -311,4 +317,114 @@ public final class Magic2015 extends ExpansionSet { cards.add(new SetCardInfo("Yisan, the Wanderer Bard", 209, Rarity.RARE, mage.cards.y.YisanTheWandererBard.class)); cards.add(new SetCardInfo("Zof Shade", 125, Rarity.COMMON, mage.cards.z.ZofShade.class)); } + + @Override + public BoosterCollator createCollator() { + return new Magic2015Collator(); + } +} + +// Booster collation info from https://www.lethe.xyz/mtg/collation/m15.html +// Using USA collation for all rarities +// Foil rare sheet used for regular rares as regular rare sheet is not known +class Magic2015Collator implements BoosterCollator { + private final CardRun commonA = new CardRun(true, "155", "27", "84", "157", "11", "55", "147", "21", "49", "140", "40", "72", "154", "39", "57", "136", "33", "43", "138", "38", "74", "165", "14", "45", "167", "20", "82", "136", "40", "57", "155", "16", "43", "140", "39", "74", "150", "38", "77", "165", "11", "49", "157", "27", "56", "147", "10", "72", "141", "14", "55", "167", "21", "84", "138", "20", "77", "154", "10", "82", "150", "16", "56", "141", "33", "45"); + private final CardRun commonB = new CardRun(true, "90", "171", "123", "193", "118", "192", "125", "180", "85", "207", "91", "206", "90", "203", "88", "185", "107", "179", "123", "199", "113", "171", "85", "200", "98", "207", "118", "206", "86", "192", "88", "180", "91", "179", "85", "199", "107", "200", "125", "207", "113", "193", "98", "192", "91", "203", "123", "185", "86", "179", "125", "171", "118", "199", "90", "193", "88", "200", "113", "180", "86", "203", "107", "206", "98", "185"); + private final CardRun commonC1 = new CardRun(true, "61", "130", "35", "70", "166", "214", "19", "79", "152", "17", "58", "143", "30", "239", "48", "131", "22", "53", "166", "223", "35", "52", "143", "26", "79", "238", "152", "31", "48", "159", "214", "22", "71", "160", "24", "58", "146", "19", "70", "130", "17", "61", "131", "26", "52", "239", "160", "31", "53", "146", "24", "223", "71", "159", "30"); + private final CardRun commonC2 = new CardRun(true, "186", "112", "181", "104", "245", "198", "114", "197", "97", "204", "92", "243", "184", "120", "170", "104", "198", "105", "173", "95", "186", "112", "204", "114", "181", "120", "197", "97", "170", "105", "92", "186", "95", "184", "114", "245", "198", "243", "173", "112", "120", "197", "105", "181", "238", "184", "104", "204", "245", "97", "173", "92", "170", "95", "243"); + private final CardRun uncommonA = new CardRun(true, "237", "54", "87", "219", "158", "208", "220", "41", "69", "242", "119", "151", "202", "216", "2", "81", "96", "221", "132", "205", "8", "237", "69", "87", "233", "158", "202", "41", "219", "54", "96", "220", "2", "69", "216", "119", "132", "208", "221", "41", "81", "233", "96", "151", "220", "202", "2", "242", "237", "54", "119", "158", "205", "219", "8", "81", "221", "87", "151", "208", "233", "132", "242", "205", "216", "8"); + private final CardRun uncommonB = new CardRun(true, "111", "148", "195", "12", "66", "196", "7", "73", "99", "161", "169", "5", "65", "236", "102", "137", "175", "32", "232", "50", "109", "126", "195", "7", "236", "66", "102", "148", "196", "5", "73", "109", "232", "137", "169", "12", "65", "99", "148", "236", "111", "161", "195", "32", "73", "102", "126", "175", "232", "7", "50", "111", "137", "196", "12", "66", "99", "126", "169", "32", "65", "109", "161", "175", "5", "50"); + private final CardRun uncommonC = new CardRun(true, "89", "129", "168", "213", "42", "60", "94", "128", "235", "190", "23", "63", "116", "234", "129", "194", "42", "51", "89", "142", "168", "13", "60", "234", "94", "129", "190", "213", "23", "63", "116", "235", "128", "194", "13", "51", "94", "142", "168", "234", "23", "60", "89", "128", "213", "190", "42", "51", "116", "142", "194", "235", "13", "63"); + private final CardRun uncommonD = new CardRun(true, "76", "226", "106", "156", "189", "9", "83", "121", "135", "188", "4", "76", "124", "156", "189", "227", "6", "59", "226", "121", "164", "188", "228", "9", "83", "106", "135", "174", "227", "4", "59", "124", "226", "164", "189", "6", "76", "121", "228", "156", "174", "9", "59", "106", "227", "135", "188", "4", "83", "228", "124", "164", "174", "6"); + private final CardRun rare = new CardRun(true, "177", "230", "149", "246", "101", "182", "28", "68", "217", "1", "172", "218", "247", "122", "127", "183", "62", "212", "153", "37", "44", "231", "15", "64", "127", "230", "108", "249", "18", "144", "68", "110", "217", "218", "37", "133", "67", "191", "36", "80", "211", "162", "100", "229", "215", "29", "93", "178", "225", "153", "64", "117", "178", "18", "163", "201", "224", "122", "191", "75", "3", "139", "244", "110", "36", "187", "115", "25", "75", "183", "80", "108", "248", "3", "162", "209", "225", "144", "101", "176", "145", "67", "34", "103", "246", "78", "100", "240", "229", "177", "145", "222", "28", "248", "15", "240", "172", "139", "44", "249", "222", "93", "134", "241", "117", "176", "149", "46", "244", "29", "209", "212", "46", "247", "133", "210", "47", "182", "241", "25", "47"); + private final CardRun land = new CardRun(false, "250", "251", "252", "253", "254", "255", "256", "257", "258", "259", "260", "261", "262", "263", "264", "265", "266", "267", "268", "269"); + + private final BoosterStructure AABBC1C1C1C1C1C1 = new BoosterStructure( + commonA, commonA, + commonB, commonB, + commonC1, commonC1, commonC1, commonC1, commonC1, commonC1 + ); + private final BoosterStructure AAABBC1C1C1C1C1 = new BoosterStructure( + commonA, commonA, commonA, + commonB, commonB, + commonC1, commonC1, commonC1, commonC1, commonC1 + ); + private final BoosterStructure AAAABBC2C2C2C2 = new BoosterStructure( + commonA, commonA, commonA, commonA, + commonB, commonB, + commonC2, commonC2, commonC2, commonC2 + ); + private final BoosterStructure AAAABBBC2C2C2 = new BoosterStructure( + commonA, commonA, commonA, commonA, + commonB, commonB, commonB, + commonC2, commonC2, commonC2 + ); + private final BoosterStructure AAAABBBBC2C2 = new BoosterStructure( + commonA, commonA, commonA, commonA, + commonB, commonB, commonB, commonB, + commonC2, commonC2 + ); + private final BoosterStructure ABC = new BoosterStructure(uncommonA, uncommonB, uncommonC); + private final BoosterStructure ABD = new BoosterStructure(uncommonA, uncommonB, uncommonD); + private final BoosterStructure ACD = new BoosterStructure(uncommonA, uncommonC, uncommonD); + private final BoosterStructure BCD = new BoosterStructure(uncommonB, uncommonC, uncommonD); + private final BoosterStructure R1 = new BoosterStructure(rare); + private final BoosterStructure L1 = new BoosterStructure(land); + + // In order for equal numbers of each common to exist, the average booster must contain: + // 3.27 A commons (36 / 11) + // 2.18 B commons (24 / 11) + // 2.73 C1 commons (30 / 11, or 60 / 11 in each C1 booster) + // 1.82 C2 commons (20 / 11, or 40 / 11 in each C2 booster) + // These numbers are the same for all sets with 101 commons in A/B/C1/C2 print runs + // and with 10 common slots per booster + private final RarityConfiguration commonRuns = new RarityConfiguration( + AABBC1C1C1C1C1C1, + AABBC1C1C1C1C1C1, + AABBC1C1C1C1C1C1, + AABBC1C1C1C1C1C1, + AABBC1C1C1C1C1C1, + AAABBC1C1C1C1C1, + AAABBC1C1C1C1C1, + AAABBC1C1C1C1C1, + AAABBC1C1C1C1C1, + AAABBC1C1C1C1C1, + AAABBC1C1C1C1C1, + + AAAABBC2C2C2C2, + AAAABBC2C2C2C2, + AAAABBC2C2C2C2, + AAAABBC2C2C2C2, + AAAABBC2C2C2C2, + AAAABBC2C2C2C2, + AAAABBC2C2C2C2, + AAAABBC2C2C2C2, + AAAABBBC2C2C2, + AAAABBBC2C2C2, + AAAABBBBC2C2 + ); + // In order for equal numbers of each uncommon to exist, the average booster must contain: + // 0.825 A uncommons (33 / 40) + // 0.825 B uncommons (33 / 40) + // 0.675 C uncommons (27 / 40) + // 0.675 D uncommons (27 / 40) + // These numbers are the same for all sets with 80 uncommons in asymmetrical A/B/C/D print runs + private final RarityConfiguration uncommonRuns = new RarityConfiguration( + ABC, ABD, ABC, ABD, ABC, ABD, ABC, ABD, ABC, ABD, ABC, ABD, ABC, + ABD, ABC, ABD, ABC, ABD, ABC, ABD, ABC, ABD, ABC, ABD, ABC, ABD, + ACD, BCD, ACD, BCD, ACD, BCD, ACD, + BCD, ACD, BCD, ACD, BCD, ACD, BCD + ); + private final RarityConfiguration rareRuns = new RarityConfiguration(R1); + private final RarityConfiguration landRuns = new RarityConfiguration(L1); + + @Override + public List makeBooster() { + List booster = new ArrayList<>(); + booster.addAll(commonRuns.getNext().makeRun()); + booster.addAll(uncommonRuns.getNext().makeRun()); + booster.addAll(rareRuns.getNext().makeRun()); + booster.addAll(landRuns.getNext().makeRun()); + return booster; + } } diff --git a/Mage.Sets/src/mage/sets/Theros.java b/Mage.Sets/src/mage/sets/Theros.java index c9ce7d0c80f..d9a39dea171 100644 --- a/Mage.Sets/src/mage/sets/Theros.java +++ b/Mage.Sets/src/mage/sets/Theros.java @@ -1,10 +1,16 @@ - package mage.sets; import mage.cards.ExpansionSet; +import mage.collation.BoosterCollator; +import mage.collation.BoosterStructure; +import mage.collation.CardRun; +import mage.collation.RarityConfiguration; import mage.constants.Rarity; import mage.constants.SetType; +import java.util.ArrayList; +import java.util.List; + /** * * @author LevelX2 @@ -276,4 +282,100 @@ public final class Theros extends ExpansionSet { cards.add(new SetCardInfo("Xenagos, the Reveler", 209, Rarity.MYTHIC, mage.cards.x.XenagosTheReveler.class)); cards.add(new SetCardInfo("Yoked Ox", 37, Rarity.COMMON, mage.cards.y.YokedOx.class)); } + + @Override + public BoosterCollator createCollator() { + return new TherosCollator(); + } +} + +// Booster collation info from https://www.lethe.xyz/mtg/collation/ths.html +// Using USA collation for common/uncommon, rare collation inferred from other sets +class TherosCollator implements BoosterCollator { + private final CardRun commonA = new CardRun(true, "88", "2", "167", "64", "165", "94", "130", "5", "55", "109", "127", "171", "8", "217", "59", "118", "161", "16", "165", "96", "119", "164", "212", "10", "106", "64", "125", "161", "5", "171", "169", "130", "56", "1", "164", "109", "119", "57", "89", "8", "106", "212", "129", "55", "2", "95", "169", "216", "118", "10", "88", "56", "167", "94", "129", "16", "89", "59", "216", "125", "217", "1", "95", "57", "96", "127"); + private final CardRun commonB = new CardRun(true, "178", "80", "72", "29", "221", "115", "176", "84", "27", "74", "218", "179", "114", "28", "70", "81", "177", "87", "73", "29", "117", "176", "30", "84", "74", "221", "178", "115", "29", "70", "73", "179", "80", "111", "30", "72", "87", "178", "117", "218", "27", "74", "81", "115", "177", "28", "84", "73", "111", "176", "218", "27", "72", "117", "114", "80", "177", "30", "70", "221", "111", "81", "179", "28", "87", "114"); + private final CardRun commonC1 = new CardRun(true, "155", "104", "21", "52", "100", "137", "158", "103", "19", "48", "133", "24", "156", "148", "45", "140", "22", "105", "50", "174", "139", "23", "158", "48", "67", "21", "134", "157", "103", "50", "155", "19", "140", "104", "44", "100", "156", "23", "134", "101", "67", "52", "148", "157", "139", "24", "105", "44", "137", "174", "101", "22", "229", "45", "133"); + private final CardRun commonC2 = new CardRun(true, "229", "39", "77", "36", "146", "183", "38", "145", "37", "182", "147", "41", "181", "78", "34", "146", "39", "31", "79", "36", "141", "43", "183", "77", "182", "145", "78", "41", "38", "34", "147", "31", "181", "79", "43", "39", "141", "183", "37", "78", "38", "36", "147", "146", "181", "77", "43", "31", "145", "34", "37", "79", "41", "182", "141"); + private final CardRun uncommonA = new CardRun(true, "97", "194", "25", "154", "142", "61", "108", "189", "35", "160", "136", "99", "195", "47", "213", "25", "159", "93", "189", "49", "142", "15", "192", "151", "97", "51", "211", "35", "185", "131", "58", "163", "99", "194", "18", "61", "128", "211", "154", "93", "190", "47", "132", "15", "163", "213", "185", "102", "136", "159", "192", "26", "131", "108", "51", "190", "151", "18", "128", "102", "49", "195", "160", "26", "132", "58"); + private final CardRun uncommonB = new CardRun(true, "7", "123", "222", "71", "92", "168", "13", "116", "203", "202", "83", "62", "11", "121", "219", "86", "69", "184", "197", "6", "123", "204", "71", "202", "82", "7", "121", "170", "68", "215", "86", "197", "168", "6", "222", "92", "113", "62", "170", "219", "13", "83", "175", "68", "116", "204", "11", "215", "203", "69", "113", "184", "82", "175"); + private final CardRun rare = new CardRun(false, "3", "4", "12", "14", "20", "32", "33", "40", "42", "46", "54", "60", "63", "65", "75", "76", "90", "98", "107", "110", "112", "120", "122", "124", "126", "138", "144", "149", "150", "152", "153", "162", "173", "180", "186", "191", "193", "198", "199", "200", "201", "205", "206", "207", "210", "214", "220", "223", "224", "225", "226", "227", "228", "3", "4", "12", "14", "20", "32", "33", "40", "42", "46", "54", "60", "63", "65", "75", "76", "90", "98", "107", "110", "112", "120", "122", "124", "126", "138", "144", "149", "150", "152", "153", "162", "173", "180", "186", "191", "193", "198", "199", "200", "201", "205", "206", "207", "210", "214", "220", "223", "224", "225", "226", "227", "228", "9", "17", "53", "66", "85", "91", "135", "143", "166", "172", "187", "188", "196", "208", "209"); + private final CardRun land = new CardRun(false, "230", "231", "232", "233", "234", "235", "236", "237", "238", "239", "240", "241", "242", "243", "244", "245", "246", "247", "248", "249"); + + private final BoosterStructure AABBC1C1C1C1C1C1 = new BoosterStructure( + commonA, commonA, + commonB, commonB, + commonC1, commonC1, commonC1, commonC1, commonC1, commonC1 + ); + private final BoosterStructure AAABBC1C1C1C1C1 = new BoosterStructure( + commonA, commonA, commonA, + commonB, commonB, + commonC1, commonC1, commonC1, commonC1, commonC1 + ); + private final BoosterStructure AAAABBC2C2C2C2 = new BoosterStructure( + commonA, commonA, commonA, commonA, + commonB, commonB, + commonC2, commonC2, commonC2, commonC2 + ); + private final BoosterStructure AAAABBBBC2C2 = new BoosterStructure( + commonA, commonA, commonA, commonA, + commonB, commonB, commonB, commonB, + commonC2, commonC2 + ); + private final BoosterStructure AAB = new BoosterStructure(uncommonA, uncommonA, uncommonB); + private final BoosterStructure ABB = new BoosterStructure(uncommonA, uncommonB, uncommonB); + private final BoosterStructure R1 = new BoosterStructure(rare); + private final BoosterStructure L1 = new BoosterStructure(land); + + // In order for equal numbers of each common to exist, the average booster must contain: + // 3.27 A commons (36 / 11) + // 2.18 B commons (24 / 11) + // 2.73 C1 commons (30 / 11, or 60 / 11 in each C1 booster) + // 1.82 C2 commons (20 / 11, or 40 / 11 in each C2 booster) + // These numbers are the same for all sets with 101 commons in A/B/C1/C2 print runs + // and with 10 common slots per booster + private final RarityConfiguration commonRuns = new RarityConfiguration( + AABBC1C1C1C1C1C1, + AABBC1C1C1C1C1C1, + AABBC1C1C1C1C1C1, + AABBC1C1C1C1C1C1, + AABBC1C1C1C1C1C1, + AAABBC1C1C1C1C1, + AAABBC1C1C1C1C1, + AAABBC1C1C1C1C1, + AAABBC1C1C1C1C1, + AAABBC1C1C1C1C1, + AAABBC1C1C1C1C1, + + AAAABBC2C2C2C2, + AAAABBC2C2C2C2, + AAAABBC2C2C2C2, + AAAABBC2C2C2C2, + AAAABBC2C2C2C2, + AAAABBC2C2C2C2, + AAAABBC2C2C2C2, + AAAABBC2C2C2C2, + AAAABBC2C2C2C2, + AAAABBBBC2C2, + AAAABBBBC2C2 + ); + // In order for equal numbers of each uncommon to exist, the average booster must contain: + // 1.65 A uncommons (33 / 20) + // 1.35 B uncommons (27 / 20) + // These numbers are the same for all sets with 60 uncommons in asymmetrical A/B print runs + private final RarityConfiguration uncommonRuns = new RarityConfiguration( + AAB, AAB, AAB, AAB, AAB, AAB, AAB, AAB, AAB, AAB, AAB, AAB, AAB, + ABB, ABB, ABB, ABB, ABB, ABB, ABB + ); + private final RarityConfiguration rareRuns = new RarityConfiguration(R1); + private final RarityConfiguration landRuns = new RarityConfiguration(L1); + + @Override + public List makeBooster() { + List booster = new ArrayList<>(); + booster.addAll(commonRuns.getNext().makeRun()); + booster.addAll(uncommonRuns.getNext().makeRun()); + booster.addAll(rareRuns.getNext().makeRun()); + booster.addAll(landRuns.getNext().makeRun()); + return booster; + } }