Implement collation for DGM, SOI, EMN and RIX

This commit is contained in:
Alex W. Jackson 2021-12-23 23:03:07 -05:00
parent 100c5df83a
commit b2b90c17fd
9 changed files with 460 additions and 14 deletions

View file

@ -214,7 +214,8 @@ class BornOfTheGodsCollator implements BoosterCollator {
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 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");
private final CardRun mythic = new CardRun(false, "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(
@ -228,6 +229,7 @@ class BornOfTheGodsCollator implements BoosterCollator {
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 M1 = new BoosterStructure(mythic);
private final BoosterStructure L1 = new BoosterStructure(land);
private final RarityConfiguration commonRuns = new RarityConfiguration(AAAAABBBBB, AAAAAABBBB);
@ -239,7 +241,7 @@ class BornOfTheGodsCollator implements BoosterCollator {
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 rareRuns = new RarityConfiguration(R1, R1, R1, R1, R1, R1, R1, M1);
private final RarityConfiguration landRuns = new RarityConfiguration(L1);
@Override

View file

@ -245,7 +245,8 @@ class DarkAscensionCollator implements BoosterCollator {
private final CardRun commonB = new CardRun(true, "103", "126", "29", "8", "73", "88", "60", "111", "19", "15", "29", "107", "35", "126", "150", "90", "73", "129", "6", "15", "68", "46", "155", "105", "72", "14", "129", "77", "38", "6", "121", "88", "134", "31", "111", "72", "103", "35", "19", "121", "90", "14", "31", "68", "105", "8", "60", "150", "134", "155", "38", "107", "46", "77");
private final CardRun uncommonA = new CardRun(true, "5", "128", "101", "153", "45", "145", "12", "67", "78", "117", "97", "44", "153", "5", "136", "57", "128", "135", "101", "154", "53", "7", "12", "57", "116", "135", "97", "44", "58", "92", "12", "136", "145", "117", "5", "78", "116", "92", "53", "58", "145", "10", "97", "7", "116", "45", "67", "154", "58", "10", "92", "44", "117", "153", "7", "78", "128", "45", "101", "67", "136", "53", "10", "135", "154", "57");
private final CardRun uncommonB = new CardRun(true, "83", "48", "16", "144", "127", "104", "42", "130", "48", "16", "84", "79", "141", "32", "130", "26", "127", "74", "83", "9", "42", "61", "144", "143", "108", "84", "26", "141", "127", "9", "48", "104", "74", "143", "79", "144", "108", "26", "32", "83", "104", "61", "42", "143", "16", "141", "130", "84", "32", "74", "108", "9", "79", "61");
private final CardRun rare = new CardRun(false, "11", "18", "20", "23", "24", "25", "30", "33", "34", "36", "37", "39", "41", "56", "62", "63", "64", "69", "80", "82", "85", "89", "93", "95", "96", "112", "114", "115", "120", "123", "124", "149", "152", "156", "158", "11", "18", "20", "23", "24", "25", "30", "33", "34", "36", "37", "39", "41", "56", "62", "63", "64", "69", "80", "82", "85", "89", "93", "95", "96", "112", "114", "115", "120", "123", "124", "149", "152", "156", "158", "1", "28", "70", "99", "131", "137", "138", "139", "142", "151");
private final CardRun rare = new CardRun(false, "11", "18", "20", "23", "24", "25", "30", "33", "34", "36", "37", "39", "41", "56", "62", "63", "64", "69", "80", "82", "85", "89", "93", "95", "96", "112", "114", "115", "120", "123", "124", "149", "152", "156", "158");
private final CardRun mythic = new CardRun(false, "1", "28", "70", "99", "131", "137", "138", "139", "142", "151");
private final CardRun doubleFaced = new CardRun(false, "13", "55", "94", "125", "13", "55", "94", "125", "13", "55", "94", "125", "13", "55", "94", "125", "13", "55", "94", "125", "13", "55", "94", "125", "13", "55", "94", "125", "13", "55", "94", "125", "13", "55", "94", "125", "13", "55", "94", "125", "13", "55", "94", "125", "13", "55", "94", "125", "13", "55", "94", "125", "13", "55", "94", "125", "13", "55", "94", "125", "13", "55", "94", "125", "13", "55", "94", "125", "13", "55", "94", "125", "50", "81", "122", "146", "50", "81", "122", "146", "50", "81", "122", "146", "50", "81", "122", "146", "50", "81", "122", "146", "50", "81", "122", "146", "50", "81", "122", "146", "50", "81", "122", "146", "50", "81", "122", "146", "71", "98", "133", "71", "98", "133", "71", "98", "133", "140", "147", "140", "147");
private final CardRun land = new CardRun(false, "ISD_250", "ISD_251", "ISD_252", "ISD_253", "ISD_254", "ISD_255", "ISD_256", "ISD_257", "ISD_258", "ISD_259", "ISD_260", "ISD_261", "ISD_262", "ISD_263", "ISD_264");
@ -256,6 +257,7 @@ class DarkAscensionCollator implements BoosterCollator {
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 M1 = new BoosterStructure(mythic);
private final BoosterStructure D1 = new BoosterStructure(doubleFaced);
private final BoosterStructure L1 = new BoosterStructure(land);
@ -268,7 +270,7 @@ class DarkAscensionCollator implements BoosterCollator {
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 rareRuns = new RarityConfiguration(R1, R1, R1, R1, R1, R1, R1, M1);
private final RarityConfiguration dfcRuns = new RarityConfiguration(D1);
private final RarityConfiguration landRuns = new RarityConfiguration(L1);

View file

@ -5,11 +5,16 @@ import mage.cards.ExpansionSet;
import mage.cards.repository.CardCriteria;
import mage.cards.repository.CardInfo;
import mage.cards.repository.CardRepository;
import mage.collation.BoosterCollator;
import mage.collation.BoosterStructure;
import mage.collation.CardRun;
import mage.collation.RarityConfiguration;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.constants.SetType;
import mage.util.RandomUtil;
import java.util.ArrayList;
import java.util.List;
/**
@ -225,4 +230,73 @@ public final class DragonsMaze extends ExpansionSet {
|| cardInfo.getName().equals("Thespian's Stage")));
return cardInfos;
}
@Override
protected void generateBoosterMap() {
super.generateBoosterMap();
CardRepository
.instance
.findCards(new CardCriteria().setCodes("RTR", "GTC").rarities(Rarity.RARE).types(CardType.LAND))
.stream()
.forEach(cardInfo -> inBoosterMap.put(cardInfo.getSetCode() + "_" + cardInfo.getCardNumber(), cardInfo));
}
@Override
public BoosterCollator createCollator() {
return new DragonsMazeCollator();
}
}
// Booster collation info from https://www.lethe.xyz/mtg/collation/dgm.html
// Using USA collation for common/uncommon, rare collation inferred from other sets
class DragonsMazeCollator implements BoosterCollator {
private final CardRun commonA = new CardRun(true, "113", "43", "12", "137", "142", "28", "109", "39", "8", "44", "19", "139", "136", "25", "87", "33", "1", "46", "39", "52", "141", "38", "25", "67", "44", "9", "145", "17", "54", "33", "21", "142", "46", "2", "52", "136", "12", "30", "87", "141", "45", "8", "37", "137", "28", "17", "113", "14", "45", "9", "139", "54", "21", "138", "109", "2", "43", "14", "145", "37", "67", "30", "138", "1", "19", "38");
private final CardRun commonB = new CardRun(true, "120", "10", "20", "32", "24", "40", "48", "15", "6", "35", "65", "140", "23", "16", "42", "10", "31", "41", "86", "4", "29", "13", "144", "32", "50", "40", "120", "3", "26", "13", "143", "48", "31", "23", "65", "6", "20", "86", "35", "50", "24", "15", "140", "4", "90", "143", "41", "26", "144", "16", "3", "90", "29", "42");
private final CardRun uncommonA = new CardRun(true, "122", "75", "77", "76", "131", "83", "118", "106", "133", "103", "101", "110", "127", "70", "102", "118", "121", "60", "76", "111", "53", "83", "75", "127", "102", "110", "121", "77", "97", "122", "106", "76", "103", "102", "117", "133", "75", "53", "110", "131", "101", "60", "61", "117", "111", "121", "97", "83", "70", "118", "61", "122", "117", "106", "131", "103", "77", "101", "133", "60", "53", "97", "127", "61", "70", "111");
private final CardRun uncommonB = new CardRun(true, "71", "129", "98", "74", "55", "105", "78", "130", "59", "56", "98", "135", "116", "129", "134", "78", "73", "74", "93", "130", "105", "79", "126", "59", "134", "55", "64", "56", "71", "73", "135", "79", "129", "93", "78", "116", "74", "126", "56", "79", "130", "55", "71", "98", "59", "135", "64", "93", "126", "105", "116", "73", "134", "64");
// Trait Doctoring not implemented (text changing effect)
private final CardRun rare = new CardRun(false, "5", "7", "11", /*"18",*/ "22", "27", "34", "36", "47", "49", "51", "58", "66", "68", "69", "72", "80", "84", "85", "88", "89", "91", "96", "99", "104", "107", "108", "112", "115", "119", "123", "124", "125", "128", "132");
private final CardRun mythic = new CardRun(false, "57", "62", "63", "81", "82", "92", "94", "95", "100", "114");
private final CardRun landCommon = new CardRun(false, "146", "147", "148", "149", "150", "151", "153", "154", "155", "156");
private final CardRun landRare = new CardRun(false, "152", "RTR_238", "RTR_241", "RTR_243", "RTR_247", "RTR_248", "152", "GTC_240", "GTC_242", "GTC_245", "GTC_247", "GTC_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 M1 = new BoosterStructure(mythic);
private final BoosterStructure L1 = new BoosterStructure(landCommon);
private final BoosterStructure L2 = new BoosterStructure(landRare);
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 40 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, R1, R1, R1, R1, R1, R1, M1);
private final RarityConfiguration landRuns = new RarityConfiguration(
L1, L1, L1, L1, L1, L1, L1, L1, L1, L1,
L1, L1, L1, L1, L1, L1, L1, L1, L1, L2
);
@Override
public List<String> makeBooster() {
List<String> 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;
}
}

View file

@ -5,10 +5,15 @@ import mage.cards.ExpansionSet;
import mage.cards.repository.CardCriteria;
import mage.cards.repository.CardInfo;
import mage.cards.repository.CardRepository;
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 mage.util.RandomUtil;
import java.util.ArrayList;
import java.util.List;
/**
@ -313,4 +318,141 @@ public final class EldritchMoon extends ExpansionSet {
}
return cardInfos;
}
@Override
public BoosterCollator createCollator() {
return new EldritchMoonCollator();
}
}
// Booster collation info from https://www.lethe.xyz/mtg/collation/emn.html
// Using USA collation for common/uncommon, rare collation inferred from other sets
class EldritchMoonCollator implements BoosterCollator {
private final CardRun commonA = new CardRun(true, "12", "126", "42", "81", "76", "77", "14", "177", "122", "57", "138", "19", "166", "194", "100", "21", "126", "12", "129", "105", "42", "150", "76", "66", "16", "172", "81", "77", "194", "19", "122", "177", "57", "14", "138", "166", "100", "76", "21", "66", "105", "150", "42", "194", "129", "12", "126", "16", "81", "172", "77", "19", "138", "122", "166", "177", "14", "57", "100", "21", "66", "172", "129", "16", "105", "150");
private final CardRun commonB = new CardRun(true, "179", "84", "173", "83", "154", "108", "160", "89", "178", "107", "151", "112", "180", "113", "8", "82", "179", "84", "173", "83", "167", "108", "178", "104", "154", "89", "180", "107", "179", "112", "160", "113", "8", "84", "173", "89", "151", "82", "178", "104", "160", "108", "167", "83", "154", "112", "151", "82", "180", "113", "167", "104", "8", "107");
private final CardRun commonC1 = new CardRun(true, "139", "48", "59", "121", "192", "35", "60", "145", "31", "52", "147", "26", "78", "116", "195", "43", "67", "139", "35", "60", "147", "26", "52", "121", "48", "192", "59", "145", "31", "78", "116", "43", "67", "139", "35", "60", "121", "192", "48", "59", "147", "26", "52", "145", "31", "78", "116", "195", "43", "67", "139", "35", "59", "121", "48", "52", "147", "26", "192", "60", "145", "43", "78", "116", "31", "67");
private final CardRun commonC2 = new CardRun(true, "127", "32", "58", "120", "44", "74", "201", "144", "30", "53", "135", "32", "55", "127", "25", "195", "120", "44", "58", "144", "30", "53", "135", "25", "74", "144", "32", "55", "201", "120", "30", "58", "127", "44", "53", "135", "201", "55", "127", "32", "74", "144", "25", "58", "195", "44", "74", "120", "30", "55", "201", "135", "25", "53");
private final CardRun uncommonA = new CardRun(true, "36", "71", "198", "128", "79", "114", "27", "68", "140", "205", "102", "34", "103", "119", "196", "61", "101", "182", "202", "13", "141", "92", "157", "38", "114", "128", "71", "198", "90", "36", "115", "68", "10", "205", "140", "101", "79", "27", "119", "102", "202", "10", "34", "103", "13", "115", "157", "92", "182", "38", "141", "61", "196", "90");
private final CardRun uncommonB = new CardRun(true, "18", "149", "152", "11", "24", "159", "188", "134", "73", "158", "62", "164", "29", "97", "125", "187", "95", "4", "161", "45", "50", "169", "110", "22", "186", "134", "88", "153", "49", "159", "133", "1", "152", "18", "11", "97", "158", "9", "143", "73", "161", "24", "94", "164", "62", "95", "187", "149", "45", "153", "4", "110", "188", "22", "88", "50", "125", "169", "1", "186", "143", "49", "29", "133", "94", "9");
private final CardRun commonDFC = new CardRun(true, "148", "124", "23", "63", "175", "91", "96a", "142", "148", "54", "91", "175", "163", "148", "33", "168", "91", "96a", "174", "175", "63", "193", "96a", "124", "54", "142", "148", "91", "96a", "23", "175", "163", "91", "148", "174", "175", "168", "63", "91", "96a", "193", "148", "33", "124", "96a", "142", "23", "54", "175", "91", "96a", "163", "148", "174", "33", "175", "168", "148", "193", "124", "91", "96a", "23", "175", "33", "148", "175", "142", "54", "63", "148", "91", "96a", "163", "175", "174", "91", "96a", "33", "148", "168", "23", "91", "96a", "193", "175", "63", "54", "148", "124", "142", "163", "175", "91", "96a", "174", "148", "168", "193", "96a", "63", "175", "124", "54", "91", "96a", "23", "148", "142", "91", "175", "163", "33", "174", "148", "91", "96a", "168", "175", "193");
private final CardRun rare = new CardRun(false, "3", "5", "7", "17", "37", "39", "40", "41", "46", "47", "51", "64", "65", "69", "72", "75", "80", "85", "86", "87", "98", "99", "106", "117", "118", "123", "131", "132", "146", "155", "156", "165", "170", "171", "176", "181", "185", "189", "197", "199", "200", "203");
private final CardRun mythic = new CardRun(false, "2", "6", "20", "70", "93", "109", "136", "137", "162", "183", "184", "190");
private final CardRun rareDFC = new CardRun(false, "15a", "56", "111", "130a", "204", "15a", "56", "111", "130a", "204", "28", "191");
private final CardRun land = new CardRun(false, "SOI_283", "SOI_284", "SOI_285", "SOI_286", "SOI_287", "SOI_288", "SOI_289", "SOI_290", "SOI_291", "SOI_292", "SOI_293", "SOI_294", "SOI_295", "SOI_296", "SOI_297");
private final BoosterStructure AABBC1C1C1C1C1 = new BoosterStructure(
commonA, commonA,
commonB, commonB,
commonC1, commonC1, commonC1, commonC1, commonC1
);
private final BoosterStructure AABBBC1C1C1C1 = new BoosterStructure(
commonA, commonA,
commonB, commonB, commonB,
commonC1, commonC1, commonC1, commonC1
);
private final BoosterStructure AAABBC1C1C1C1 = new BoosterStructure(
commonA, commonA, commonA,
commonB, commonB,
commonC1, commonC1, commonC1, commonC1
);
private final BoosterStructure AABBBC2C2C2C2 = new BoosterStructure(
commonA, commonA,
commonB, commonB, commonB,
commonC2, commonC2, commonC2, commonC2
);
private final BoosterStructure AAABBC2C2C2C2 = new BoosterStructure(
commonA, commonA, commonA,
commonB, commonB,
commonC2, commonC2, commonC2, commonC2
);
private final BoosterStructure AAABBBC2C2C2 = new BoosterStructure(
commonA, commonA, commonA,
commonB, commonB, commonB,
commonC2, commonC2, commonC2
);
private final BoosterStructure AAAABBC2C2C2 = new BoosterStructure(
commonA, commonA, commonA, commonA,
commonB, commonB,
commonC2, commonC2, commonC2
);
private final BoosterStructure AABBC2C2C2C2D = new BoosterStructure(
commonA, commonA,
commonB, commonB,
commonC2, commonC2, commonC2, commonC2,
rareDFC
);
private final BoosterStructure AABBBC2C2C2D = new BoosterStructure(
commonA, commonA,
commonB, commonB, commonB,
commonC2, commonC2, commonC2,
rareDFC
);
private final BoosterStructure AAABBC2C2C2D = new BoosterStructure(
commonA, commonA, commonA,
commonB, commonB,
commonC2, commonC2, commonC2,
rareDFC
);
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 M1 = new BoosterStructure(mythic);
private final BoosterStructure D1 = new BoosterStructure(commonDFC);
private final BoosterStructure L1 = new BoosterStructure(land);
// In order for equal numbers of each common to exist, the average booster must contain:
// 2.789 A commons (1562 / 560) (rounded to 67/24)
// 2.282 B commons (1278 / 560) (rounded to 55/24)
// 2.092 C1 commons (2343 / 1120) (rounded to 50/24)
// 1.712 C2 commons (1917 / 1120) (rounded to 41/24)
private final RarityConfiguration commonRuns = new RarityConfiguration(
AABBC1C1C1C1C1,
AABBC1C1C1C1C1,
AABBBC1C1C1C1,
AABBBC1C1C1C1,
AAABBC1C1C1C1,
AAABBC1C1C1C1,
AAABBC1C1C1C1,
AAABBC1C1C1C1,
AAABBC1C1C1C1,
AAABBC1C1C1C1,
AAABBC1C1C1C1,
AAABBC1C1C1C1,
AABBBC2C2C2C2,
AABBBC2C2C2C2,
AAABBC2C2C2C2,
AAABBC2C2C2C2,
AAABBBC2C2C2,
AAABBBC2C2C2,
AAAABBC2C2C2,
AAAABBC2C2C2,
AAAABBC2C2C2,
AABBC2C2C2C2D,
AABBBC2C2C2D,
AAABBC2C2C2D
);
// In order for equal numbers of each uncommon to exist, the average booster must contain:
// 1.35 A uncommons (27 / 20)
// 1.65 B uncommons (33 / 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,
ABB, ABB, ABB, ABB, ABB, ABB, ABB, ABB, ABB, ABB, ABB, ABB, ABB
);
private final RarityConfiguration rareRuns = new RarityConfiguration(R1, R1, R1, R1, R1, R1, R1, M1);
private final RarityConfiguration dfcRuns = new RarityConfiguration(D1);
private final RarityConfiguration landRuns = new RarityConfiguration(L1);
@Override
public List<String> makeBooster() {
List<String> booster = new ArrayList<>();
booster.addAll(commonRuns.getNext().makeRun());
booster.addAll(uncommonRuns.getNext().makeRun());
booster.addAll(rareRuns.getNext().makeRun());
booster.addAll(dfcRuns.getNext().makeRun());
booster.addAll(landRuns.getNext().makeRun());
return booster;
}
}

View file

@ -271,12 +271,14 @@ public final class FateReforged extends ExpansionSet {
}
// Booster collation info from https://www.lethe.xyz/mtg/collation/frf.html
// Using USA collation for common/uncommon, rare collation inferred from other sets
// Using USA collation for all rarities
// Foil rare sheets used for regular rares as regular rare sheet is not known
class FateReforgedCollator implements BoosterCollator {
private final CardRun commonA = new CardRun(true, "5", "57", "82", "53", "24", "38", "86", "153", "21", "6", "39", "73", "152", "2", "47", "68", "58", "4", "33", "89", "153", "10", "45", "72", "86", "3", "31", "61", "158", "26", "53", "81", "154", "21", "57", "85", "37", "24", "38", "82", "150", "5", "2", "31", "89", "152", "10", "33", "72", "47", "26", "58", "61", "150", "3", "45", "81", "73", "6", "39", "85", "154", "4", "37", "68", "158");
private final CardRun commonB = new CardRun(true, "106", "121", "25", "115", "133", "107", "129", "88", "116", "135", "108", "124", "98", "128", "13", "92", "130", "96", "121", "60", "103", "144", "107", "122", "59", "102", "134", "95", "129", "25", "116", "133", "98", "140", "88", "108", "128", "106", "124", "115", "135", "13", "102", "122", "103", "130", "60", "96", "144", "95", "140", "59", "92", "134");
private final CardRun uncommon = new CardRun(true, "104", "49", "32", "67", "46", "139", "14", "101", "83", "23", "160", "16", "76", "69", "126", "105", "35", "97", "30", "159", "80", "125", "118", "77", "34", "51", "7", "40", "94", "28", "78", "136", "114", "161", "48", "42", "12", "66", "83", "120", "117", "44", "18", "67", "127", "15", "112", "141", "32", "29", "132", "164", "63", "123", "119", "93", "71", "41", "101", "111", "17", "49", "162", "74", "80", "139", "147", "30", "104", "46", "69", "77", "14", "105", "159", "164", "118", "23", "63", "160", "123", "97", "93", "141", "41", "44", "126", "17", "136", "34", "112", "76", "78", "71", "162", "16", "114", "7", "161", "120", "51", "35", "74", "66", "18", "125", "40", "42", "132", "28", "147", "12", "94", "48", "119", "29", "15", "117", "127", "111");
private final CardRun rare = new CardRun(false, "8", "9", "11", "19", "22", "36", "43", "50", "52", "54", "62", "65", "75", "79", "84", "87", "90", "91", "99", "100", "109", "110", "131", "137", "138", "142", "146", "148", "149", "151", "155", "156", "157", "163", "167", "8", "9", "11", "19", "22", "36", "43", "50", "52", "54", "62", "65", "75", "79", "84", "87", "90", "91", "99", "100", "109", "110", "131", "137", "138", "142", "146", "148", "149", "151", "155", "156", "157", "163", "167", "1", "20", "27", "55", "56", "64", "70", "113", "143", "145");
private final CardRun rareA = new CardRun(true, "62", "142", "109", "1", "54", "22", "163", "149", "75", "148", "56", "99", "52", "167", "11", "156", "87", "70", "137", "155", "90", "36", "157", "138", "145", "100", "19", "84", "62", "146", "91", "55", "148", "22", "50", "109", "149", "9", "113", "151", "138", "163", "142", "99", "87", "27", "11", "167", "137", "54", "90", "64", "75", "36", "155", "157", "52", "100", "143", "84", "156", "146", "19", "91", "20", "50", "9", "151");
private final CardRun rareB = new CardRun(true, "65", "131", "8", "43", "79", "110");
private final CardRun landCommon = new CardRun(true, "165", "169", "166", "171", "168", "165", "174", "171", "173", "172", "166", "170", "169", "175", "168", "173", "170", "165", "172", "169", "174", "166", "175", "171", "168", "170", "172", "174", "175", "173");
private final CardRun landRare = new CardRun(false, "KTK_230", "KTK_233", "KTK_239", "KTK_248", "KTK_249");
@ -289,13 +291,17 @@ class FateReforgedCollator implements BoosterCollator {
commonB, commonB, commonB, commonB
);
private final BoosterStructure U1 = new BoosterStructure(uncommon, uncommon, uncommon);
private final BoosterStructure R1 = new BoosterStructure(rare);
private final BoosterStructure R1 = new BoosterStructure(rareA);
private final BoosterStructure R2 = new BoosterStructure(rareB);
private final BoosterStructure L1 = new BoosterStructure(landCommon);
private final BoosterStructure L2 = new BoosterStructure(landRare);
private final RarityConfiguration commonRuns = new RarityConfiguration(AAAAABBBBB, AAAAAABBBB);
private final RarityConfiguration uncommonRuns = new RarityConfiguration(U1);
private final RarityConfiguration rareRuns = new RarityConfiguration(R1);
private final RarityConfiguration rareRuns = new RarityConfiguration(
R1, R1, R1, R1, R1, R1, R1, R1, R1, R1,
R1, R1, R1, R1, R1, R1, R1, R2, R2, R2
);
private final RarityConfiguration landRuns = new RarityConfiguration(
L1, L1, L1, L1, L1, L1, L1, L1,
L1, L1, L1, L1, L1, L1, L1, L1,

View file

@ -343,7 +343,8 @@ public final class Ixalan extends ExpansionSet {
}
// Booster collation info from https://www.lethe.xyz/mtg/collation/xln.html
// Using USA collation for common/uncommon, rare collation inferred from other sets
// Using USA collation for all rarities
// Foil rare sheet used for regular rares as regular rare sheet is not known
class IxalanCollator implements BoosterCollator {
private final CardRun commonA = new CardRun(true, "142", "20", "102", "169", "23", "114", "134", "21", "123", "146", "28", "115", "160", "6", "112", "158", "36", "107", "152", "40", "101", "164", "43", "98", "166", "21", "122", "142", "37", "102", "141", "20", "113", "146", "38", "114", "134", "23", "115", "144", "28", "92", "169", "29", "123", "158", "6", "112", "152", "36", "98", "160", "40", "107", "164", "43", "101", "144", "37", "122", "141", "38", "113", "166", "29", "92");
private final CardRun commonB = new CardRun(true, "64", "182", "78", "194", "75", "198", "76", "193", "77", "202", "52", "181", "73", "209", "68", "192", "65", "178", "85", "204", "69", "186", "77", "194", "64", "193", "78", "202", "75", "198", "73", "182", "76", "181", "85", "178", "52", "204", "68", "209", "65", "192", "69", "186", "78", "202", "75", "198", "64", "182", "76", "181", "73", "193", "65", "194", "77", "204", "69", "178", "85", "209", "68", "192", "52", "186");
@ -351,7 +352,8 @@ class IxalanCollator implements BoosterCollator {
private final CardRun commonC2 = new CardRun(true, "139", "124", "8", "190", "239", "172", "47", "180", "8", "95", "148", "87", "177", "25", "239", "168", "183", "124", "53", "26", "139", "190", "105", "172", "32", "47", "180", "148", "95", "177", "25", "239", "168", "105", "26", "183", "172", "53", "190", "8", "124", "139", "25", "177", "95", "47", "87", "148", "26", "183", "87", "105", "168", "53", "180");
private final CardRun uncommonA = new CardRun(true, "216", "83", "116", "247", "151", "196", "16", "79", "236", "162", "188", "35", "56", "110", "245", "174", "214", "39", "108", "237", "171", "212", "30", "67", "128", "218", "150", "216", "83", "131", "254", "140", "207", "9", "51", "119", "241", "162", "196", "63", "109", "247", "151", "214", "15", "62", "108", "237", "157", "212", "79", "116", "236", "174", "188", "39", "56", "110", "245", "150", "216", "67", "131", "254", "171", "196", "30", "83", "128", "218", "140", "16", "51", "119", "241", "162", "207", "9", "63", "109", "245", "150", "35", "56", "110", "247", "151", "214", "15", "62", "108", "237", "157", "39", "79", "109", "254", "174", "188", "16", "51", "131", "241", "140", "35", "63", "119", "236", "171", "212", "30", "67", "116", "218", "207", "9", "62", "128", "157", "15");
private final CardRun uncommonB = new CardRun(true, "111", "7", "50", "187", "220", "1", "226", "91", "45", "208", "149", "121", "4", "210", "10", "228", "155", "229", "97", "86", "197", "153", "130", "12", "48", "176", "221", "133", "17", "100", "84", "201", "138", "111", "7", "70", "205", "225", "143", "14", "91", "50", "187", "149", "121", "4", "45", "208", "226", "155", "1", "219", "86", "210", "153", "97", "258", "84", "176", "220", "133", "17", "229", "48", "197", "138", "100", "10", "70", "201", "228", "143", "14", "111", "50", "205", "153", "130", "12", "84", "187", "219", "155", "1", "91", "45", "208", "226", "97", "4", "86", "197", "221", "149", "7", "121", "228", "210", "225", "258", "10", "48", "176", "220", "133", "17", "100", "229", "138", "221", "12", "258", "201", "219", "14", "225", "130", "70", "205", "143");
private final CardRun rare = new CardRun(false, "2", "5", "13", "19", "22", "24", "27", "33", "34", "42", "46", "49", "54", "55", "57", "59", "61", "71", "74", "82", "90", "93", "99", "106", "117", "118", "120", "126", "129", "132", "135", "136", "137", "154", "156", "165", "170", "173", "184", "185", "189", "191", "199", "203", "206", "213", "215", "223", "227", "234", "235", "238", "243", "246", "248", "249", "250", "251", "252", "253", "255", "256", "257", "2", "5", "13", "19", "22", "24", "27", "33", "34", "42", "46", "49", "54", "55", "57", "59", "61", "71", "74", "82", "90", "93", "99", "106", "117", "118", "120", "126", "129", "132", "135", "136", "137", "154", "156", "165", "170", "173", "184", "185", "189", "191", "199", "203", "206", "213", "215", "223", "227", "234", "235", "238", "243", "246", "248", "249", "250", "251", "252", "253", "255", "256", "257", "3", "44", "60", "66", "94", "104", "159", "161", "179", "217", "222", "224", "230", "231", "232");
private final CardRun rare = new CardRun(true, "137", "46", "213", "223", "3", "120", "57", "19", "248", "165", "93", "154", "49", "215", "227", "44", "132", "255", "24", "251", "224", "99", "184", "54", "2", "238", "60", "135", "256", "27", "252", "126", "106", "185", "55", "5", "246", "66", "136", "257", "203", "253", "231", "33", "189", "82", "13", "71", "94", "248", "46", "206", "170", "61", "34", "199", "59", "203", "93", "104", "251", "49", "129", "184", "57", "42", "117", "19", "206", "99", "159", "252", "54", "2", "185", "230", "55", "255", "24", "132", "106", "161", "253", "223", "5", "189", "118", "156", "256", "27", "135", "213", "179", "33", "227", "13", "199", "120", "137", "257", "165", "136", "215", "217", "34", "238", "82", "126", "232", "154", "71", "170", "129", "61", "222", "42", "246", "118", "59", "156", "117");
private final CardRun rareDFC = new CardRun(false, "22", "74", "90", "173", "191", "234", "235", "243", "249", "250");
private final CardRun land = new CardRun(false, "260", "261", "262", "263", "264", "265", "266", "267", "268", "269", "270", "271", "272", "273", "274", "275", "276", "277", "278", "279");
private final BoosterStructure AABBC1C1C1C1C1C1 = new BoosterStructure(
@ -377,6 +379,7 @@ class IxalanCollator implements BoosterCollator {
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 R2 = new BoosterStructure(rareDFC);
private final BoosterStructure L1 = new BoosterStructure(land);
// In order for equal numbers of each common to exist, the average booster must contain:
@ -412,7 +415,7 @@ class IxalanCollator implements BoosterCollator {
AAAABBBBC2C2
);
private final RarityConfiguration uncommonRuns = new RarityConfiguration(AAB, ABB);
private final RarityConfiguration rareRuns = new RarityConfiguration(R1);
private final RarityConfiguration rareRuns = new RarityConfiguration(R1, R1, R1, R1, R1, R1, R2);
private final RarityConfiguration landRuns = new RarityConfiguration(L1);
@Override

View file

@ -214,7 +214,8 @@ class JourneyIntoNyxCollator implements BoosterCollator {
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 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");
private final CardRun mythic = new CardRun(false, "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(
@ -228,6 +229,7 @@ class JourneyIntoNyxCollator implements BoosterCollator {
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 M1 = new BoosterStructure(mythic);
private final BoosterStructure L1 = new BoosterStructure(land);
private final RarityConfiguration commonRuns = new RarityConfiguration(AAAAABBBBB, AAAAAABBBB);
@ -239,7 +241,7 @@ class JourneyIntoNyxCollator implements BoosterCollator {
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 rareRuns = new RarityConfiguration(R1, R1, R1, R1, R1, R1, R1, M1);
private final RarityConfiguration landRuns = new RarityConfiguration(L1);
@Override

View file

@ -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 fireshoes
*/
@ -243,4 +249,91 @@ public final class RivalsOfIxalan extends ExpansionSet {
cards.add(new SetCardInfo("Zacama, Primal Calamity", 174, Rarity.MYTHIC, mage.cards.z.ZacamaPrimalCalamity.class));
cards.add(new SetCardInfo("Zetalpa, Primal Dawn", 30, Rarity.RARE, mage.cards.z.ZetalpaPrimalDawn.class));
}
@Override
public BoosterCollator createCollator() {
return new RivalsOfIxalanCollator();
}
}
// Booster collation info from https://www.lethe.xyz/mtg/collation/rix.html
// Using USA collation for all rarities
// Foil rare sheet used for regular rares as regular rare sheet is not known
class RivalsOfIxalanCollator implements BoosterCollator {
private final CardRun commonA = new CardRun(true, "105", "11", "50", "104", "101", "43", "119", "20", "34", "116", "26", "49", "118", "15", "44", "108", "19", "57", "95", "5", "47", "104", "27", "43", "105", "26", "101", "119", "20", "50", "118", "11", "34", "116", "19", "44", "95", "5", "57", "108", "15", "49", "104", "5", "47", "101", "27", "49", "119", "11", "50", "116", "20", "57", "95", "26", "43", "105", "15", "34", "108", "19", "44", "118", "27", "47");
private final CardRun commonB = new CardRun(true, "133", "89", "131", "91", "143", "84", "135", "70", "138", "71", "132", "91", "139", "79", "122", "63", "131", "67", "133", "89", "138", "84", "143", "69", "135", "71", "140", "79", "139", "70", "133", "67", "122", "63", "132", "89", "138", "84", "143", "69", "131", "91", "135", "79", "140", "71", "139", "70", "132", "67", "122", "63", "140", "69");
private final CardRun commonC1 = new CardRun(true, "74", "120", "7", "96", "114", "61", "178", "183", "137", "75", "36", "106", "4", "61", "181", "25", "52", "141", "75", "7", "114", "120", "36", "183", "137", "181", "74", "141", "61", "25", "106", "114", "178", "7", "4", "137", "96", "74", "52", "120", "183", "36", "75", "106", "178", "4", "52", "181", "74", "141", "120", "25", "36", "114", "178", "7", "183", "61", "181", "75", "52", "137", "4", "106", "25", "141");
private final CardRun commonC2 = new CardRun(true, "41", "184", "186", "125", "134", "96", "14", "58", "125", "12", "65", "56", "76", "23", "184", "186", "41", "93", "134", "12", "125", "65", "56", "14", "58", "76", "186", "96", "93", "23", "125", "41", "134", "184", "14", "65", "56", "186", "93", "12", "58", "184", "41", "23", "14", "76", "134", "56", "65", "12", "58", "76", "93", "23");
private final CardRun uncommonA = new CardRun(true, "149", "55", "117", "153", "189", "112", "128", "21", "35", "164", "191", "129", "48", "10", "169", "190", "78", "145", "3", "39", "81", "188", "124", "38", "9", "163", "187", "102", "149", "21", "48", "153", "189", "129", "55", "9", "161", "191", "110", "128", "21", "35", "112", "190", "117", "39", "10", "164", "78", "102", "145", "3", "110", "187", "9", "38", "117", "169", "81", "3", "124", "78", "102", "161", "191", "129", "35", "112", "153", "189", "10", "128", "81", "48", "163", "188", "149", "55", "110", "164", "187", "145", "3", "78", "38", "169", "189", "124", "35", "112", "163", "190", "21", "128", "81", "39", "153", "188", "129", "55", "102", "161", "191", "10", "149", "117", "48", "164", "187", "145", "39", "110", "163", "190", "9", "124", "169", "38", "161", "188");
private final CardRun uncommonB = new CardRun(true, "156", "53", "17", "73", "54", "107", "83", "6", "146", "72", "168", "37", "13", "73", "32", "113", "82", "123", "54", "17", "62", "172", "109", "126", "8", "53", "97", "80", "148", "155", "1", "85", "156", "98", "6", "83", "37", "107", "72", "146", "170", "53", "82", "172", "113", "123", "1", "32", "97", "62", "148", "168", "13", "85", "156", "109", "17", "80", "54", "98", "73", "126", "155", "8", "83", "170", "97", "123", "6", "37", "107", "72", "146", "172", "1", "62", "168", "98", "8", "82", "53", "113", "80", "148", "156", "32", "73", "155", "109", "126", "13", "54", "107", "85", "146", "170", "17", "83", "168", "113", "6", "72", "37", "97", "62", "123", "172", "13", "85", "155", "98", "126", "8", "32", "109", "82", "148", "170", "1", "80");
private final CardRun rare = new CardRun(true, "175", "22", "167", "29", "2", "86", "16", "147", "162", "103", "45", "177", "24", "171", "59", "45", "87", "22", "150", "182", "115", "46", "86", "28", "103", "88", "46", "90", "24", "151", "185", "121", "51", "87", "30", "115", "111", "51", "92", "28", "167", "174", "127", "60", "90", "31", "121", "144", "60", "94", "18", "171", "175", "130", "64", "92", "33", "127", "152", "64", "99", "31", "147", "177", "136", "66", "94", "40", "130", "154", "66", "100", "33", "150", "180", "142", "68", "99", "42", "136", "157", "68", "182", "40", "151", "2", "30", "77", "100", "16", "142", "159", "77", "185", "42", "18");
private final CardRun rareDFC = new CardRun(false, "158", "160", "165", "166", "173", "179", "158", "160", "165", "166", "173", "179", "176");
private final CardRun land = new CardRun(false, "192", "193", "194", "195", "196");
private final BoosterStructure AAABBC1C1C1C1C1 = new BoosterStructure(
commonA, commonA, commonA,
commonB, commonB,
commonC1, commonC1, commonC1, commonC1, commonC1
);
private final BoosterStructure AAABBBC1C1C1C1 = new BoosterStructure(
commonA, commonA, commonA,
commonB, commonB, commonB,
commonC1, commonC1, commonC1, commonC1
);
private final BoosterStructure AAABBBC2C2C2C2 = new BoosterStructure(
commonA, commonA, commonA,
commonB, commonB, commonB,
commonC2, commonC2, commonC2, commonC2
);
private final BoosterStructure AAAABBC2C2C2C2 = new BoosterStructure(
commonA, commonA, commonA, commonA,
commonB, commonB,
commonC2, commonC2, 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 R2 = new BoosterStructure(rareDFC);
private final BoosterStructure L1 = new BoosterStructure(land);
// In order for equal numbers of each common to exist, the average booster must contain:
// 3.14 A commons (44 / 14)
// 2.57 B commons (36 / 14)
// 2.36 C1 commons (33 / 14)
// 1.93 C2 commons (27 / 14)
// These numbers are the same for all sets with 70 commons in A/B/C1/C2 print runs
// and with 10 common slots per booster
private final RarityConfiguration commonRuns = new RarityConfiguration(
AAABBC1C1C1C1C1, AAABBC1C1C1C1C1, AAABBC1C1C1C1C1, AAABBC1C1C1C1C1,
AAABBC1C1C1C1C1, AAABBC1C1C1C1C1, AAABBC1C1C1C1C1, AAABBC1C1C1C1C1,
AAABBC1C1C1C1C1, AAABBC1C1C1C1C1, AAABBC1C1C1C1C1, AAABBC1C1C1C1C1,
AAABBC1C1C1C1C1, AAABBC1C1C1C1C1, AAABBC1C1C1C1C1, AAABBC1C1C1C1C1,
AAABBBC1C1C1C1, AAABBBC1C1C1C1, AAABBBC1C1C1C1, AAABBBC1C1C1C1,
AAABBBC1C1C1C1, AAABBBC1C1C1C1, AAABBBC1C1C1C1, AAABBBC1C1C1C1,
AAABBBC1C1C1C1, AAABBBC1C1C1C1, AAABBBC1C1C1C1, AAABBBC1C1C1C1,
AAABBBC1C1C1C1,
AAABBBC2C2C2C2, AAABBBC2C2C2C2, AAABBBC2C2C2C2, AAABBBC2C2C2C2,
AAABBBC2C2C2C2, AAABBBC2C2C2C2, AAABBBC2C2C2C2, AAABBBC2C2C2C2,
AAABBBC2C2C2C2, AAABBBC2C2C2C2, AAABBBC2C2C2C2, AAABBBC2C2C2C2,
AAABBBC2C2C2C2, AAABBBC2C2C2C2, AAABBBC2C2C2C2, AAABBBC2C2C2C2,
AAABBBC2C2C2C2, AAABBBC2C2C2C2, AAABBBC2C2C2C2,
AAAABBC2C2C2C2, AAAABBC2C2C2C2, AAAABBC2C2C2C2, AAAABBC2C2C2C2,
AAAABBC2C2C2C2, AAAABBC2C2C2C2, AAAABBC2C2C2C2, AAAABBC2C2C2C2
);
private final RarityConfiguration uncommonRuns = new RarityConfiguration(AAB, ABB);
private final RarityConfiguration rareRuns = new RarityConfiguration(R1, R1, R1, R1, R1, R1, R1, R2);
private final RarityConfiguration landRuns = new RarityConfiguration(L1);
@Override
public List<String> makeBooster() {
List<String> 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;
}
}

View file

@ -2,10 +2,15 @@ package mage.sets;
import mage.cards.Card;
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 mage.util.RandomUtil;
import java.util.ArrayList;
import java.util.List;
/**
@ -397,4 +402,121 @@ public final class ShadowsOverInnistrad extends ExpansionSet {
}
addToBooster(booster, getSpecialCardsByRarity(rarity));
}
@Override
public BoosterCollator createCollator() {
return new ShadowsOverInnistradCollator();
}
}
// Booster collation info from https://www.lethe.xyz/mtg/collation/soi.html
// Using USA collation for common/uncommon, rare collation inferred from other sets
class ShadowsOverInnistradCollator implements BoosterCollator {
private final CardRun commonA = new CardRun(true, "95", "10", "76", "47", "78", "44", "85", "26", "91", "39", "80", "11", "74", "48", "72", "35", "87", "24", "86", "41", "71", "17", "70", "9", "89", "26", "66", "25", "55", "91", "78", "19", "64", "14", "51", "44", "76", "47", "85", "48", "95", "3", "80", "24", "71", "9", "72", "17", "87", "39", "74", "10", "70", "11", "66", "35", "86", "25", "51", "41", "89", "19", "55", "14", "64", "3");
private final CardRun commonB = new CardRun(true, "268", "216", "40", "172", "112", "84", "267", "146", "4", "136", "213", "262", "133", "27", "67", "280", "255", "117", "18", "56", "218", "4", "268", "136", "180", "216", "40", "172", "112", "267", "84", "146", "27", "280", "213", "117", "262", "67", "18", "218", "180", "133", "267", "172", "4", "56", "112", "216", "268", "40", "146", "84", "136", "255", "213", "27", "280", "133", "262", "67", "218", "18", "117", "180", "255", "56");
private final CardRun commonC1 = new CardRun(true, "214", "106", "154", "204", "121", "174", "217", "137", "186", "197", "132", "126", "156", "224", "110", "177", "223", "98", "176", "198", "106", "189", "214", "121", "174", "217", "130", "153", "222", "123", "165", "232", "126", "154", "204", "137", "186", "224", "132", "176", "223", "98", "153", "198", "138", "189", "232", "130", "156", "197", "110", "177", "222", "123", "165");
private final CardRun commonC2 = new CardRun(true, "205", "134", "164", "237", "142", "185", "231", "105", "188", "239", "142", "168", "193", "143", "191", "205", "144", "178", "196", "115", "143", "164", "231", "134", "188", "196", "115", "185", "193", "105", "168", "237", "144", "191", "239", "143", "164", "205", "138", "178", "231", "142", "185", "193", "134", "191", "237", "144", "188", "196", "115", "168", "239", "105", "178");
private final CardRun uncommonA = new CardRun(true, "166", "100", "238", "57", "30", "160", "120", "206", "68", "28", "261", "170", "104", "50", "208", "36", "114", "73", "195", "61", "22", "254", "150", "129", "201", "79", "32", "140", "184", "219", "52", "38", "220", "175", "120", "240", "93", "45", "127", "152", "238", "50", "28", "254", "160", "100", "206", "57", "30", "114", "166", "195", "68", "22", "257", "170", "129", "79", "208", "38", "73", "175", "220", "93", "36", "261", "150", "104", "219", "61", "45", "127", "184", "201", "52", "28", "240", "152", "120", "195", "166", "32", "140", "170", "238", "57", "22", "254", "175", "100", "206", "50", "30", "114", "93", "220", "68", "38", "257", "160", "129", "79", "208", "36", "127", "184", "240", "73", "45", "261", "152", "104", "219", "52", "32", "140", "150", "201", "61", "257");
private final CardRun uncommonB = new CardRun(true, "161", "23", "263", "103", "82", "277", "33", "236", "275", "135", "258", "167", "29", "211", "113", "269", "173", "20", "221", "279", "125", "83", "282", "37", "207", "118", "77", "187", "42", "259", "273", "128", "62", "161", "7", "263", "103", "90", "171", "23", "199", "277", "135", "60", "173", "33", "236", "102", "82", "279", "20", "258", "275", "113", "83", "183", "29", "269", "125", "77", "167", "37", "221", "282", "259", "187", "42", "211", "118", "62", "171", "23", "207", "273", "128", "90", "183", "7", "236", "102", "263", "167", "29", "221", "277", "103", "60", "279", "33", "258", "135", "82", "161", "20", "199", "275", "113", "83", "187", "37", "211", "125", "77", "173", "42", "207", "282", "118", "90", "171", "269", "199", "128", "62", "183", "7", "259", "273", "102", "60");
private final CardRun commonDFC = new CardRun(true, "149", "116", "203", "229", "119", "49", "158", "260", "54", "149", "194", "6", "229", "169", "158", "147", "256", "210", "97", "209", "34", "182", "94", "229", "215", "210", "116", "46", "149", "266", "190", "158", "54", "203", "149", "260", "210", "147", "194", "158", "6", "256", "229", "49", "119", "210", "169", "149", "209", "34", "229", "215", "94", "158", "182", "97", "46", "149", "116", "203", "210", "190", "49", "158", "54", "266", "229", "194", "210", "6", "119", "149", "97", "169", "229", "260", "94", "158", "147", "256", "46", "209", "149", "116", "182", "229", "190", "34", "158", "215", "210", "169", "266", "229", "260", "54", "210", "119", "203", "149", "97", "158", "256", "6", "149", "34", "194", "210", "215", "49", "158", "266", "229", "94", "182", "46", "209", "147", "210", "190");
private final CardRun rare = new CardRun(false, "1", "2", "8", "12", "15", "16", "31", "43", "53", "58", "59", "63", "75", "81", "96", "99", "107", "109", "111", "122", "139", "141", "145", "148", "151", "155", "157", "163", "179", "181", "200", "202", "212", "227", "228", "230", "233", "234", "241", "242", "244", "246", "249", "252", "253", "264", "270", "271", "272", "274", "276", "278");
private final CardRun rareJournal = new CardRun(false, "265", "265+a", "265+b", "265+c", "265+d", "265+e");
private final CardRun mythic = new CardRun(false, "13", "65", "69", "101", "124", "131", "162", "192", "226", "235", "245", "247", "248", "250", "251");
private final CardRun rareDFC = new CardRun(false, "21", "92", "108", "159", "225", "281", "21", "92", "108", "159", "225", "281", "5", "88", "243");
private final CardRun land = new CardRun(false, "283", "284", "285", "286", "287", "288", "289", "290", "291", "292", "293", "294", "295", "296", "297");
private final BoosterStructure AAABC1C1C1C1C1 = new BoosterStructure(
commonA, commonA, commonA,
commonB,
commonC1, commonC1, commonC1, commonC1, commonC1
);
private final BoosterStructure AAABBC1C1C1C1 = new BoosterStructure(
commonA, commonA, commonA,
commonB, commonB,
commonC1, commonC1, commonC1, commonC1
);
private final BoosterStructure AAABBC2C2C2C2 = new BoosterStructure(
commonA, commonA, commonA,
commonB, commonB,
commonC2, commonC2, commonC2, commonC2
);
private final BoosterStructure AAABBBC2C2C2 = new BoosterStructure(
commonA, commonA, commonA,
commonB, commonB, commonB,
commonC2, commonC2, commonC2
);
private final BoosterStructure AABBC2C2C2C2D = new BoosterStructure(
commonA, commonA,
commonB, commonB,
commonC2, commonC2, commonC2, commonC2,
rareDFC
);
private final BoosterStructure AABBBC2C2C2D = new BoosterStructure(
commonA, commonA,
commonB, commonB, commonB,
commonC2, commonC2, commonC2,
rareDFC
);
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 RJ = new BoosterStructure(rareJournal);
private final BoosterStructure M1 = new BoosterStructure(mythic);
private final BoosterStructure D1 = new BoosterStructure(commonDFC);
private final BoosterStructure L1 = new BoosterStructure(land);
// In order for equal numbers of each common to exist, the average booster must contain:
// 2.905 A commons (639 / 220) (rounded to 46/16)
// 1.936 B commons (426 / 220) (rounded to 31/16)
// 2.420 C1 commons (1065 / 440) (rounded to 39/16)
// 1.614 C2 commons (710 / 440) (rounded to 26/16)
private final RarityConfiguration commonRuns = new RarityConfiguration(
AAABC1C1C1C1C1,
AAABC1C1C1C1C1,
AAABC1C1C1C1C1,
AAABC1C1C1C1C1,
AAABC1C1C1C1C1,
AAABC1C1C1C1C1,
AAABC1C1C1C1C1,
AAABBC1C1C1C1,
AAABBC2C2C2C2,
AAABBBC2C2C2,
AAABBBC2C2C2,
AAABBBC2C2C2,
AAABBBC2C2C2,
AAABBBC2C2C2,
AABBC2C2C2C2D,
AABBBC2C2C2D
);
private final RarityConfiguration uncommonRuns = new RarityConfiguration(AAB, ABB);
private final RarityConfiguration rareRuns = new RarityConfiguration(
R1, R1, R1, R1, R1, R1, R1, R1, R1, R1,
R1, R1, R1, R1, R1, R1, R1, R1, R1, R1,
R1, R1, R1, R1, R1, R1, R1, R1, R1, R1,
R1, R1, R1, R1, R1, R1, R1, R1, R1, R1,
R1, R1, R1, R1, R1, R1, R1, R1, R1, R1,
R1, R1, R1, R1, R1, R1, R1, R1, R1, R1,
R1, R1, R1, R1, R1, R1, R1, R1, R1, R1,
R1, R1, R1, R1, R1, R1, R1, R1, R1, R1,
R1, R1, R1, R1, R1, R1, R1, R1, R1, R1,
R1, R1, R1, R1, R1, R1, R1, R1, R1, R1,
R1, R1, R1, R1, RJ, RJ,
M1, M1, M1, M1, M1, M1, M1, M1, M1, M1,
M1, M1, M1, M1, M1
);
private final RarityConfiguration dfcRuns = new RarityConfiguration(D1);
private final RarityConfiguration landRuns = new RarityConfiguration(L1);
@Override
public List<String> makeBooster() {
List<String> booster = new ArrayList<>();
booster.addAll(commonRuns.getNext().makeRun());
booster.addAll(uncommonRuns.getNext().makeRun());
booster.addAll(rareRuns.getNext().makeRun());
booster.addAll(dfcRuns.getNext().makeRun());
booster.addAll(landRuns.getNext().makeRun());
return booster;
}
}