Last active
August 29, 2015 14:02
-
-
Save hackling/7bcede3246cc5ac9b317 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'json' | |
cards = JSON.parse(File.open('THS.json').read)['cards'] | |
RARE_TO_MYTHIC_MULTIPLIER = 2 | |
NUMBER_OF_EACH_MYTHIC_PRINTED = 100 | |
NUMBER_OF_BOOSTERS = 200 | |
cards_in_set = { | |
'Mythic Rare' => [], | |
'Rare' => [], | |
'Uncommon' => [], | |
'Common' => [], | |
'Basic Land' => [], | |
} | |
print_run = [] | |
cards.each do |card| | |
cards_in_set[card['rarity']] << card['name'] | |
end | |
NUMBER_OF_EACH_MYTHIC_PRINTED.times do | |
cards_in_set['Mythic Rare'].each do |card| | |
print_run << card | |
end | |
cards_in_set['Rare'].each do |card| | |
RARE_TO_MYTHIC_MULTIPLIER.times do | |
print_run << card | |
end | |
end | |
end | |
print_run.shuffle! | |
contents_of_boosters = Hash.new(0) | |
print_run[0..NUMBER_OF_BOOSTERS].each do |card| | |
contents_of_boosters[card] += 1 | |
end | |
puts contents_of_boosters |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Assuming 1 of each Mythic, 2 of each Rare, and opening 200 boosters | |
{ | |
"Abhorrent Overlord": 2, | |
"Agent of the Fates": 2, | |
"Akroan Horse": 2, | |
"Anax and Cymede": 2, | |
"Anger of the Gods": 2, | |
"Anthousa, Setessan Hero": 2, | |
"Arbor Colossus": 2, | |
"Artisan of Forms": 2, | |
"Ashen Rider": 1, | |
"Ashiok, Nightmare Weaver": 1, | |
"Bident of Thassa": 2, | |
"Boon Satyr": 2, | |
"Bow of Nylea": 2, | |
"Celestial Archon": 2, | |
"Chained to the Rocks": 2, | |
"Colossus of Akros": 2, | |
"Curse of the Swine": 2, | |
"Daxos of Meletis": 2, | |
"Elspeth, Sun's Champion": 1, | |
"Ember Swallower": 2, | |
"Erebos, God of the Dead": 1, | |
"Fabled Hero": 2, | |
"Firedrinker Satyr": 2, | |
"Fleecemane Lion": 2, | |
"Gift of Immortality": 2, | |
"Hammer of Purphoros": 2, | |
"Heliod, God of the Sun": 1, | |
"Hero's Downfall": 2, | |
"Hundred-Handed One": 2, | |
"Hythonia the Cruel": 1, | |
"Labyrinth Champion": 2, | |
"Master of Waves": 1, | |
"Medomai the Ageless": 1, | |
"Meletis Charlatan": 2, | |
"Mistcutter Hydra": 2, | |
"Nighthowler": 2, | |
"Nykthos, Shrine to Nyx": 2, | |
"Nylea, God of the Hunt": 1, | |
"Polis Crusher": 2, | |
"Polukranos, World Eater": 1, | |
"Prognostic Sphinx": 2, | |
"Prophet of Kruphix": 2, | |
"Psychic Intrusion": 2, | |
"Purphoros, God of the Forge": 1, | |
"Pyxis of Pandemonium": 2, | |
"Rageblood Shaman": 2, | |
"Reaper of the Wilds": 2, | |
"Reverent Hunter": 2, | |
"Shipbreaker Kraken": 2, | |
"Soldier of the Pantheon": 2, | |
"Spear of Heliod": 2, | |
"Steam Augury": 2, | |
"Stormbreath Dragon": 1, | |
"Swan Song": 2, | |
"Sylvan Caryatid": 2, | |
"Temple of Abandon": 2, | |
"Temple of Deceit": 2, | |
"Temple of Mystery": 2, | |
"Temple of Silence": 2, | |
"Temple of Triumph": 2, | |
"Thassa, God of the Sea": 1, | |
"Thoughtseize": 2, | |
"Titan of Eternal Fire": 2, | |
"Triad of Fates": 2, | |
"Tymaret, the Murder King": 2, | |
"Underworld Cerberus": 1, | |
"Whip of Erebos": 2, | |
"Xenagos, the Reveler": 1 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Assuming 100 of each Mythic, 200 of each Rare, and opening 200 boosters | |
{ | |
"Abhorrent Overlord": 6, | |
"Agent of the Fates": 7, | |
"Akroan Horse": 3, | |
"Anax and Cymede": 3, | |
"Anger of the Gods": 2, | |
"Anthousa, Setessan Hero": 6, | |
"Arbor Colossus": 2, | |
"Artisan of Forms": 3, | |
"Ashen Rider": 3, | |
"Ashiok, Nightmare Weaver": 1, | |
"Bident of Thassa": 4, | |
"Boon Satyr": 2, | |
"Bow of Nylea": 3, | |
"Celestial Archon": 6, | |
"Chained to the Rocks": 4, | |
"Curse of the Swine": 1, | |
"Daxos of Meletis": 2, | |
"Ember Swallower": 2, | |
"Erebos, God of the Dead": 1, | |
"Fabled Hero": 4, | |
"Firedrinker Satyr": 5, | |
"Fleecemane Lion": 3, | |
"Gift of Immortality": 2, | |
"Hammer of Purphoros": 4, | |
"Heliod, God of the Sun": 2, | |
"Hero's Downfall": 7, | |
"Hundred-Handed One": 4, | |
"Labyrinth Champion": 2, | |
"Master of Waves": 1, | |
"Medomai the Ageless": 1, | |
"Meletis Charlatan": 3, | |
"Mistcutter Hydra": 3, | |
"Nighthowler": 4, | |
"Nykthos, Shrine to Nyx": 1, | |
"Polis Crusher": 5, | |
"Polukranos, World Eater": 1, | |
"Prognostic Sphinx": 3, | |
"Prophet of Kruphix": 3, | |
"Psychic Intrusion": 6, | |
"Purphoros, God of the Forge": 2, | |
"Pyxis of Pandemonium": 5, | |
"Rageblood Shaman": 2, | |
"Reaper of the Wilds": 1, | |
"Reverent Hunter": 3, | |
"Shipbreaker Kraken": 1, | |
"Soldier of the Pantheon": 4, | |
"Spear of Heliod": 5, | |
"Steam Augury": 1, | |
"Stormbreath Dragon": 2, | |
"Swan Song": 5, | |
"Sylvan Caryatid": 2, | |
"Temple of Abandon": 9, | |
"Temple of Deceit": 2, | |
"Temple of Mystery": 3, | |
"Temple of Silence": 5, | |
"Thassa, God of the Sea": 2, | |
"Thoughtseize": 5, | |
"Titan of Eternal Fire": 5, | |
"Triad of Fates": 1, | |
"Tymaret, the Murder King": 3, | |
"Underworld Cerberus": 1, | |
"Whip of Erebos": 4, | |
"Xenagos, the Reveler": 3 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Assuming 100 of each Mythic, 200 of each Rare, and opening 6 cases (36*6*6) boosters | |
{ | |
"Abhorrent Overlord": 29, | |
"Agent of the Fates": 33, | |
"Akroan Horse": 24, | |
"Anax and Cymede": 21, | |
"Anger of the Gods": 26, | |
"Anthousa, Setessan Hero": 27, | |
"Arbor Colossus": 24, | |
"Artisan of Forms": 18, | |
"Ashen Rider": 10, | |
"Ashiok, Nightmare Weaver": 14, | |
"Bident of Thassa": 22, | |
"Boon Satyr": 26, | |
"Bow of Nylea": 19, | |
"Celestial Archon": 25, | |
"Chained to the Rocks": 28, | |
"Colossus of Akros": 20, | |
"Curse of the Swine": 21, | |
"Daxos of Meletis": 20, | |
"Elspeth, Sun's Champion": 12, | |
"Ember Swallower": 14, | |
"Erebos, God of the Dead": 8, | |
"Fabled Hero": 26, | |
"Firedrinker Satyr": 22, | |
"Fleecemane Lion": 19, | |
"Gift of Immortality": 26, | |
"Hammer of Purphoros": 19, | |
"Heliod, God of the Sun": 16, | |
"Hero's Downfall": 24, | |
"Hundred-Handed One": 18, | |
"Hythonia the Cruel": 11, | |
"Labyrinth Champion": 23, | |
"Master of Waves": 9, | |
"Medomai the Ageless": 10, | |
"Meletis Charlatan": 17, | |
"Mistcutter Hydra": 18, | |
"Nighthowler": 26, | |
"Nykthos, Shrine to Nyx": 22, | |
"Nylea, God of the Hunt": 11, | |
"Polis Crusher": 21, | |
"Polukranos, World Eater": 14, | |
"Prognostic Sphinx": 19, | |
"Prophet of Kruphix": 18, | |
"Psychic Intrusion": 19, | |
"Purphoros, God of the Forge": 9, | |
"Pyxis of Pandemonium": 14, | |
"Rageblood Shaman": 21, | |
"Reaper of the Wilds": 24, | |
"Reverent Hunter": 22, | |
"Shipbreaker Kraken": 23, | |
"Soldier of the Pantheon": 24, | |
"Spear of Heliod": 24, | |
"Steam Augury": 18, | |
"Stormbreath Dragon": 15, | |
"Swan Song": 21, | |
"Sylvan Caryatid": 17, | |
"Temple of Abandon": 18, | |
"Temple of Deceit": 22, | |
"Temple of Mystery": 18, | |
"Temple of Silence": 18, | |
"Temple of Triumph": 21, | |
"Thassa, God of the Sea": 7, | |
"Thoughtseize": 25, | |
"Titan of Eternal Fire": 16, | |
"Triad of Fates": 20, | |
"Tymaret, the Murder King": 13, | |
"Underworld Cerberus": 6, | |
"Whip of Erebos": 24, | |
"Xenagos, the Reveler": 8 | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment