Sealed Deck Generator
Posted: Fri Oct 09, 2020 7:15 pm
I'm organizing a sealed deck tournament on CardNum. You can read more about the tournament over here: viewtopic.php?f=146&t=4334&p=36989#p36989
In doing that, I came up with a few solutions for randomly generating sealed packs. The first is a simple spreadsheet. The second is a more sophisticated python script. A friend is also designing custom MECCG software but that does not have a release date.
I have reviewed these for errors so I know there are likely to be errors. Let me know what you find.
The spreadsheet is an online Google Sheets spreadsheet that will randomly generate starter decks and booster packs. You will need to create a copy (File > Make a Copy). https://docs.google.com/spreadsheets/d/ ... sp=sharing
The limitation of this format is that it is possible to receive duplicates of cards that only appear once on the sheet (e.g., you can get duplicate METW Uncommons). Which I think is actually not possible in a real pack. Or at least, I have never seen or heard of it. The benefit of the spreadsheet is that it is online and anyone can open it on their phone even.
WARNING: I fixed a few issues with the commons and uncommons, and CA/CB in the python script as mentioned below. These issues were not fixed in the spreadsheet.
Note that the spreadsheet has had the sites removed from the sheets. I don't think I included the sheets with the sites in there, but that is still available in the python script. Also note that the METW boosters are not 6CB+5CA, they are just 11 of CB+CA, but in the python script it will do 6CB+5CA if you do not remove the sites from the sheet.
(i'll fix that extra common there...)
I don't know python but I made a script that we will be using to generate the packs. This script will choose cards from the sheet without replacement so that it should not be possible to get duplicates of cards that appear only once on the sheet. Also, it will output the cards formatted for Card Num so that you can copy and paste the list into the Deck Builder to see what you all have. Unfortunately, resources and hazards are intermixed. You can run this on your own computer by installing python or you can use an online interpreter: https://www.programiz.com/python-progra ... -compiler/. Open the text file and copy it into there. Or rename to .py and run it on your computer. By the way, if you really look at the code you will notice that it is junk. And that there are some extra features, sometimes partially implemented. So stick to generating the sealed packs without sites (default) and you should be OK.
Here is a sample of what it does. Pasting this into the Card Num Deck Builder will aggregate the duplicates and it will ignore the junk.
> ren textfile.txt python.py
In doing that, I came up with a few solutions for randomly generating sealed packs. The first is a simple spreadsheet. The second is a more sophisticated python script. A friend is also designing custom MECCG software but that does not have a release date.
I have reviewed these for errors so I know there are likely to be errors. Let me know what you find.
The spreadsheet is an online Google Sheets spreadsheet that will randomly generate starter decks and booster packs. You will need to create a copy (File > Make a Copy). https://docs.google.com/spreadsheets/d/ ... sp=sharing
The limitation of this format is that it is possible to receive duplicates of cards that only appear once on the sheet (e.g., you can get duplicate METW Uncommons). Which I think is actually not possible in a real pack. Or at least, I have never seen or heard of it. The benefit of the spreadsheet is that it is online and anyone can open it on their phone even.
WARNING: I fixed a few issues with the commons and uncommons, and CA/CB in the python script as mentioned below. These issues were not fixed in the spreadsheet.
Note that the spreadsheet has had the sites removed from the sheets. I don't think I included the sheets with the sites in there, but that is still available in the python script. Also note that the METW boosters are not 6CB+5CA, they are just 11 of CB+CA, but in the python script it will do 6CB+5CA if you do not remove the sites from the sheet.
(i'll fix that extra common there...)
I don't know python but I made a script that we will be using to generate the packs. This script will choose cards from the sheet without replacement so that it should not be possible to get duplicates of cards that appear only once on the sheet. Also, it will output the cards formatted for Card Num so that you can copy and paste the list into the Deck Builder to see what you all have. Unfortunately, resources and hazards are intermixed. You can run this on your own computer by installing python or you can use an online interpreter: https://www.programiz.com/python-progra ... -compiler/. Open the text file and copy it into there. Or rename to .py and run it on your computer. By the way, if you really look at the code you will notice that it is junk. And that there are some extra features, sometimes partially implemented. So stick to generating the sealed packs without sites (default) and you should be OK.
Here is a sample of what it does. Pasting this into the Card Num Deck Builder will aggregate the duplicates and it will ignore the junk.
NOTE for this attached .txt document. It is actually the python script and you can rename the extension to .py. I haven't bothered how to set Windows 10 to show extension but you can also use command line to rename the extension using the "ren" command:Middle-earth Collectible Card Game
Sealed Deck Tournament Pack Generator
Available products:
$9.95 - The Wizards Unlimited Starter Deck (76 cards: 24Fixed/3R/9U/40C)
$2.95 - The Wizards Unlimited Booster Pack (15 cards: 1R/3U/11C)
$2.95 - The Dragons Booster Pack (15 cards: 1R/4U/10C)
$2.95 - Dark Minions Booster Pack (15 cards: 1R/4U/10C)
$9.95 - The Lidless Eye Starter Deck (76 cards: 24Fixed/3R/12U/37C)
$2.95 - The Lidless Eye Booster Pack (15 cards: 1R/4U/10C)
$3.25 - Against The Shadow Booster Pack (12 cards: 4U/2R/6C)
$3.25 - The White Hand Booster Pack (12 cards: 4U/2R/6C)
Do you want site and region cards to be included as normal? (Y or N, default N): N
Sites have been removed from the sheets
How many The Wizards starter decks? 1
How many The Wizards booster packs? 2
How many The Dragons booster packs? 2
How many Dark Minions booster packs? 1
How many Lidless Eye starter decks? 1
How many Lidless Eye booster packs? 1
How many Against the Shadow booster packs? 2
How many White Hand booster packs? 1
Total Cost: $ 47.35
-= The Wizards Starter Deck 1 =-
Fixed Pack:
1 Gates of Morning (TW)
1 Saruman [H] (TW)
1 Pallando [H] (TW)
1 Aragorn II (TW)
1 Boromir II (TW)
1 Kili (TW)
1 Elladan (TW)
1 Annalena (TW)
1 Rangers of the North (TW)
1 Men of Anorien (TW)
1 Doors of Night (TW)
Uncommons (9):
1 Red Arrow (TW)
1 Orc-lieutenant (TW)
1 Narsil (TW)
1 Blue Mountain Dwarves (TW)
1 Dwarven Ring of Thrár's Tribe [H] (TW)
1 Arinmîr (TW)
1 Palantír of Elostirion [H] (TW)
1 Lossoth (TW)
1 Glamdring (TW)
Rares (3):
1 Traitor (TW)
1 Fair Sailing (TW)
1 Galadriel (TW)
Commons (40):
1 Precious Gold Ring (TW)
1 Long Winter (TW)
1 Precious Gold Ring (TW)
1 Test of Lore (TW)
1 Awaken Minions (TW)
1 Dark Quarrels (TW)
1 Foul Fumes (TW)
1 Cave-drake (TW)
1 Healing Herbs (TW)
1 River (TW)
1 Twilight (TW)
1 Lost in Border-lands (TW)
1 Orc-warriors (TW)
1 Fellowship (TW)
1 Arouse Minions (TW)
1 Vanishment (TW)
1 Test of Form (TW)
1 Thorough Search (TW)
1 Lure of the Senses (TW)
1 Dreams of Lore (TW)
1 Slayer (TW)
1 Test of Form (TW)
1 Orc-warband (TW)
1 Great-road (TW)
1 Orc-guard (TW)
1 Miruvor (TW)
1 Arouse Denizens (TW)
1 Twilight (TW)
1 Dagger of Westernesse (TW)
1 Stealth (TW)
1 Abductor (TW)
1 Crebain (TW)
1 Orc-raiders (TW)
1 Lure of Expedience (TW)
1 Sword of Gondolin (TW)
1 Healing Herbs (TW)
1 Awaken Denizens (TW)
1 Giant Spiders (TW)
1 Lost in the Wilderness (TW)
1 Muster (TW)
-= The Wizards Booster Pack 1 =-
Uncommons (3):
1 Men of Dorwinion (TW)
1 Lesser Ring (TW)
1 Plague of Wights (TW)
Rare (1):
1 Words of Power and Terror (TW)
Commons (11):
1 Dagger of Westernesse (TW)
1 Lure of Nature (TW)
1 Muster Disperses (TW)
1 Fellowship (TW)
1 Crebain (TW)
1 Ambusher (TW)
1 Halfling Strength (TW)
1 Escape (TW)
1 Arouse Minions (TW)
1 Lost in Free-domains (TW)
1 Dreams of Lore (TW)
-= The Wizards Booster Pack 2 =-
Uncommons (3):
1 Anborn (TW)
1 Woses of the Drúadan Forest (TW)
1 Glamdring (TW)
Rare (1):
1 Dwarven Ring of Bávor's Tribe [H] (TW)
Commons (11):
1 Ghouls (TW)
1 Awaken Denizens (TW)
1 Corpse-candle (TW)
1 Wolves (TW)
1 Fair Travels in Wilderness (TW)
1 Fellowship (TW)
1 Lure of Nature (TW)
1 Beautiful Gold Ring (TW)
1 Great-road (TW)
1 A Friend or Three (TW)
1 Wargs (TW)
-= The Dragons Booster Pack 1 =-
Uncommons (4):
1 Riddling Talk (TD)
1 Dragon-lore (TD)
1 Waybread (TD)
1 Cruel Caradhras (TD)
Rare (1):
1 Velocity of Haste (TD)
Commons (10):
1 Worn and Famished (TD)
1 Refuge (TD)
1 Cram (TD)
1 Incite Minions (TD)
1 Marvels Told (TD)
1 Secret News (TD)
1 Dire Wolves (TD)
1 Harad (TD)
1 Dunlending Raiders (TD)
1 Elf-path (TD)
-= The Dragons Booster Pack 2 =-
Uncommons (4):
1 Itangast Ahunt (TD)
1 Bairanax Ahunt (TD)
1 From the Pits of Angband (TD)
1 Rumor of Wealth (TD)
Rare (1):
1 Subtlety of Guile (TD)
Commons (10):
1 Harad (TD)
1 Refuge (TD)
1 Light-drake (TD)
1 Elf-path (TD)
1 Gift of Comprehension (TD)
1 Dragon-sickness (TD)
1 Cram (TD)
1 Half an Eye Open (TD)
1 Peril Returned (TD)
1 Dwarven Hoard (TD)
-= Dark Minions Booster Pack 1 =-
Uncommons (4):
1 Eyes of the Shadow (DM)
1 Drums (DM)
1 Lindion the Oronín (DM)
1 Folco Boffin (DM)
Rare (1):
1 The Hunt (DM)
Commons (10):
1 No Waiting to Wonder (DM)
1 Two or Three Tribes Present (DM)
1 Pierced by Many Wounds (DM)
1 Good Sense Revolts (DM)
1 Seized by Terror (DM)
1 Leaf Brooch (DM)
1 Hall of Fire (DM)
1 Enduring Tales (DM)
1 Withdrawn to Mordor (DM)
1 Angmar Arises (DM)
-= Lidless Eye Starter Deck 1 =-
1 Hoarmûrath the Ringwraith (LE)
1 The Witch-king (LE)
1 Gorbag (LE)
1 Nevido Smôd (LE)
1 Orc Tracker (LE)
1 Orc Veteran (LE)
1 Muzgash (LE)
1 Easterlings (LE)
1 Orcs of Gundabad (LE)
1 The Least of Gold Rings (LE)
1 Magic Ring of Enigma (LE)
1 Sudden Call (LE)
1 Heralded Lord (LE)
1 Orcs of the Red Eye (LE)
1 Dunlending Spy (LE)
1 Ent in Search of the Entwives (LE)
1 Palantír of Orthanc [M] (LE)
1 Sable Shield (LE)
1 Dorelas (LE)
1 Veils Flung Away (LE)
1 Thing Stolen (LE)
1 Orcs of the Ash Mountains (LE)
1 Rats! (LE)
1 Orc Stealth (LE)
1 Lieutenant of Angmar (LE)
1 Bróin (LE)
1 No News of Our Riding (LE)
1 Bade to Rule (LE)
1 Lure of Nature (LE)
1 Horse-lords (LE)
1 Foolish Words (LE)
1 Smart and Secret (LE)
1 Call of Home (LE)
1 Lesser Spiders (LE)
1 Lost in the Wilderness (LE)
1 Orc-draughts (LE)
1 Foolish Words (LE)
1 Long Winter (LE)
1 Dire Wolves (LE)
1 Orc Brawler (LE)
1 Thunder's Companion (LE)
1 Awaken Defenders (LE)
1 Black-hide Shield (LE)
1 Bold Thrust (LE)
1 Cave-drake (LE)
1 A Nice Place to Hide (LE)
1 Greed (LE)
1 Giant (LE)
1 Rebel-talk (LE)
1 Orc-watch (LE)
1 Giant Spiders (LE)
1 Hobgoblins (LE)
1 Black-mail Coat (LE)
1 Ghosts (LE)
1 A Little Gold Ring (LE)
1 The Names Among Them (LE)
1 Trifling Ring (LE)
1 Dire Wolves (LE)
1 Forced March (LE)
1 War-wolf (LE)
1 Wargs (LE)
1 Stabbed Him in His Sleep (LE)
1 I'll Report You (LE)
1 Orc-warband (LE)
-= Lidless Eye Booster Pack 1 =-
1 Hide in Dark Places (LE)
1 Half-trolls (LE)
1 Stone Trolls (LE)
1 Palantír of Orthanc [M] (LE)
1 The Reviled Ring (LE)
1 Gondorian Rangers (LE)
1 Wild Trolls (LE)
1 Minor Ring (LE)
1 Gifts as Given of Old (LE)
1 By the Ringwraith's Word (LE)
1 Blazon of the Eye (LE)
1 Test of Fire (LE)
1 Orc Tracker (LE)
1 Incite Defenders (LE)
1 The Ring Leaves Its Mark (LE)
-= Against the Shadow Booster Pack 1 =-
1 Wain-easterlings [M] (AS)
1 Dwarven Ring of Thélor's Tribe [M] (AS)
1 Eye Never Sleeping (AS)
1 Orders from Lugbúrz (AS)
1 Lord of the Carrock (AS)
1 Spies Feared (AS)
1 Dwarven Travelers (AS)
1 Stout Men of Gondor (AS)
1 Black Horse (AS)
1 Regiment of Black Crows (AS)
1 Turning Hope to Despair (AS)
1 Hoard Well-searched (AS)
-= Against the Shadow Booster Pack 2 =-
1 Bow of the Galadhrim (AS)
1 Driven as by a Madness (AS)
1 The Dark Power (AS)
1 Eye Never Sleeping (AS)
1 Farmer Maggot (AS)
1 Great Lord of Goblin-gate (AS)
1 Power Against the Shadow (AS)
1 Records Unread (AS)
1 Summons from Long Sleep (AS)
1 Join With That Power (AS)
1 Hoard Well-searched (AS)
1 Goblin Earth-plumb (AS)
-= The White Hand Booster Pack 1 =-
1 Will You Not Come Down? (WH)
1 Pallando's Apprentice (WH)
1 Heart Grown Cold (WH)
1 Friend of Secret Things (WH)
1 Power Relinquished to Artifice (WH)
1 The Fiery Blade (WH)
1 Beasts of the Wood (WH)
1 Foul Tooth Unsheathed (WH)
1 An Untimely Brood (WH)
1 Mechanical Bow (WH)
1 Alatar [F] (WH)
1 Alatar [F] (WH)
> ren textfile.txt python.py