From d60680b3f4dcd6209cc3c7b79e038fc17774b9b6 Mon Sep 17 00:00:00 2001 From: tiera3 <87589219+tiera3@users.noreply.github.com> Date: Sun, 29 Sep 2024 17:59:16 +1000 Subject: [PATCH] [LRW] Lorwyn booster collation (closes #12934) --- Mage.Sets/src/mage/sets/Lorwyn.java | 65 +++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/Mage.Sets/src/mage/sets/Lorwyn.java b/Mage.Sets/src/mage/sets/Lorwyn.java index a40bb52b2b0c..072258c03e75 100644 --- a/Mage.Sets/src/mage/sets/Lorwyn.java +++ b/Mage.Sets/src/mage/sets/Lorwyn.java @@ -3,6 +3,13 @@ import mage.cards.ExpansionSet; import mage.constants.Rarity; import mage.constants.SetType; +import mage.collation.BoosterCollator; +import mage.collation.BoosterStructure; +import mage.collation.CardRun; +import mage.collation.RarityConfiguration; + +import java.util.ArrayList; +import java.util.List; /** * @author North @@ -328,4 +335,62 @@ private Lorwyn() { cards.add(new SetCardInfo("Wydwen, the Biting Gale", 253, Rarity.RARE, mage.cards.w.WydwenTheBitingGale.class)); cards.add(new SetCardInfo("Zephyr Net", 98, Rarity.COMMON, mage.cards.z.ZephyrNet.class)); } + + @Override + public BoosterCollator createCollator() { + return new LorwynCollator(); + } +} + +// Booster collation info from https://www.lethe.xyz/mtg/collation/lrw.html +// order not known for uncommon runs, but card division is +// pack distribution for uncommons not specified, assuming AAB ABB as in Onslaught +class LorwynCollator implements BoosterCollator { + private final CardRun commonA = new CardRun(true, "91", "191", "128", "197", "177", "35", "77", "108", "260", "231", "32", "84", "189", "214", "126", "23", "181", "134", "77", "231", "258", "156", "33", "189", "90", "128", "211", "126", "35", "96", "227", "148", "48", "91", "161", "103", "229", "260", "181", "32", "78", "227", "156", "143", "23", "96", "103", "148", "211", "258", "20", "84", "191", "108", "197", "33", "78", "177", "134", "229", "161", "48", "90", "143", "214", "20"); + private final CardRun commonB = new CardRun(true, "118", "57", "17", "212", "110", "190", "68", "201", "34", "265", "118", "151", "242", "25", "115", "76", "184", "228", "147", "27", "57", "183", "223", "257", "4", "146", "184", "212", "50", "137", "43", "201", "194", "265", "87", "4", "198", "110", "185", "261", "232", "17", "68", "146", "190", "223", "43", "76", "147", "185", "242", "261", "27", "115", "151", "228", "87", "34", "137", "198", "50", "194", "257", "25", "232", "183"); + private final CardRun commonC = new CardRun(true, "16", "62", "132", "152", "206", "12", "54", "129", "163", "234", "16", "97", "166", "111", "241", "152", "8", "81", "99", "273", "205", "170", "29", "89", "141", "166", "93", "234", "45", "132", "163", "62", "241", "29", "141", "154", "81", "218", "45", "129", "157", "93", "206", "54", "8", "154", "111", "218", "170", "12", "89", "99", "205", "97", "157"); + private final CardRun commonD = new CardRun(true, "22", "225", "153", "109", "79", "217", "140", "39", "164", "204", "51", "24", "138", "225", "41", "79", "100", "80", "164", "140", "52", "24", "236", "153", "47", "215", "101", "98", "100", "22", "70", "186", "40", "204", "47", "52", "127", "98", "138", "215", "80", "180", "51", "236", "109", "39", "127", "186", "41", "217", "70", "101", "180", "40", "273"); + private final CardRun uncommonA = new CardRun(false, "5", "102", "155", "7", "55", "11", "162", "59", "207", "208", "13", "112", "64", "165", "167", "169", "67", "18", "174", "117", "119", "26", "224", "226", "122", "72", "73", "130", "136", "188", "82", "42", "237", "239", "94", "46", "275", "277", "279", "243"); + private final CardRun uncommonB = new CardRun(false, "53", "199", "158", "160", "9", "200", "10", "58", "60", "61", "63", "113", "168", "114", "116", "171", "172", "216", "19", "220", "221", "182", "222", "28", "124", "125", "74", "36", "235", "38", "139", "86", "142", "193", "144", "195", "276", "278", "49", "245"); + private final CardRun rare = new CardRun(false, "1", "266", "2", "150", "149", "267", "3", "104", "6", "246", "105", "159", "202", "106", "254", "56", "203", "255", "256", "247", "107", "209", "210", "65", "14", "66", "248", "15", "213", "268", "69", "173", "175", "21", "249", "176", "269", "219", "178", "179", "71", "120", "121", "123", "230", "30", "31", "75", "270", "250", "131", "187", "133", "233", "135", "37", "259", "83", "271", "85", "272", "88", "274", "192", "92", "251", "262", "145", "44", "263", "238", "264", "240", "280", "95", "196", "281", "252", "244", "253"); + + private final BoosterStructure AAAAAACCCCC = new BoosterStructure( + commonA, commonA, commonA, commonA, commonA, commonA, + commonC, commonC, commonC, commonC, commonC + ); + private final BoosterStructure AAAAAADDDDD = new BoosterStructure( + commonA, commonA, commonA, commonA, commonA, commonA, + commonD, commonD, commonD, commonD, commonD + ); + private final BoosterStructure BBBBBBCCCCC = new BoosterStructure( + commonB, commonB, commonB, commonB, commonB, commonB, + commonC, commonC, commonC, commonC, commonC + ); + private final BoosterStructure BBBBBBDDDDD = new BoosterStructure( + commonB, commonB, commonB, commonB, commonB, commonB, + commonD, commonD, commonD, commonD, commonD + ); + private final BoosterStructure ABB = new BoosterStructure(uncommonA, uncommonB, uncommonB); + private final BoosterStructure AAB = new BoosterStructure(uncommonA, uncommonA, uncommonB); + + private final BoosterStructure R1 = new BoosterStructure(rare); + + private final RarityConfiguration commonRuns = new RarityConfiguration( + AAAAAACCCCC, AAAAAADDDDD, BBBBBBCCCCC, BBBBBBDDDDD + ); + + private final RarityConfiguration uncommonRuns = new RarityConfiguration( + AAB, ABB + ); + + private final RarityConfiguration rareRuns = new RarityConfiguration(R1); + + @Override + public List makeBooster() { + List booster = new ArrayList<>(); + booster.addAll(commonRuns.getNext().makeRun()); + booster.addAll(uncommonRuns.getNext().makeRun()); + booster.addAll(rareRuns.getNext().makeRun()); + return booster; + } }