Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions dominion-shuffle
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
"""Picks 10 random cards from the Dominion base game.
"""
import getopt
import json
import math
import random
import re
import sys

kingdom_card_sets = {
'dominion': set('Adventurer,Bureaucrat,Cellar,Chancellor,Chapel,Council Room,Feast,Festival,Gardens,Laboratory,Library,Market,Militia,Mine,Moat,Moneylender,Remodel,Smithy,Spy,Thief,Throne Room,Village,Witch,Woodcutter,Workshop'.split(',')),
'prosperity': set('Bank,Bishop,City,Contraband,Counting House,Expand,Forge,Goons,Grand Market,Hoard,King\'s Court,Loan,Mint,Monument,Mountebank,Peddler,Quarry,Rabble,Royal Seal,Talisman,Trade Route,Vault,Venture,Watchtower,Worker\'s Village'.split(','))
'intrigue': set('Baron,Bridge,Conspirator,Coppersmith,Courtyard,Duke,Great Hall,Harem,Ironworks,Masquerade,Mining Village,Minion,Nobles,Pawn,Saboteur,Scout,Secret Chamber,Shanty Town,Steward,Swindler,Torturer,Trading Post,Tribute,Upgrade,Wishing Well'.split(',')),
'seaside': set('Ambassador,Bazaar,Caravan,Cutpurse,Embargo,Explorer,Fishing Village,Ghost Ship,Haven,Island,Lighthouse,Lookout,Merchant Ship,Native Village,Navigator,Outpost,Pearl Diver,Pirate Ship,Salvager,Sea Hag,Smugglers,Tactician,Treasure Map,Treasury,Warehouse,Wharf'.split(',')),
'alchemy': set('Alchemist,Apothecary,Apprentice,Familiar,Golem,Herbalist,Philosopher\'s Stone,Possession,Scrying Pool,Transmute,University,Vineyard'.split(',')),
'prosperity': set('Bank,Bishop,City,Contraband,Counting House,Expand,Forge,Goons,Grand Market,Hoard,King\'s Court,Loan,Mint,Monument,Mountebank,Peddler,Quarry,Rabble,Royal Seal,Talisman,Trade Route,Vault,Venture,Watchtower,Worker\'s Village'.split(',')),
'cornucopia': set('Fairgrounds,Farming Village,Fortune Teller,Hamlet,Harvest,Horn of Plenty,Horse Traders,Hunting Party,Jester,Menagerie,Remake,Tournament,Young Witch'.split(',')),
'hinterlands': set('Border Village,Cache,Cartographer,Crossroads,Develop,Duchess,Embassy,Farmland,Fool\'s Gold,Haggler,Highway,Ill-Gotten Gains,Inn,Jack of All Trades,Mandarin,Margrave,Noble Brigand,Nomad Camp,Oasis,Oracle,Scheme,Silk Road,Spice Merchant,Stables,Trader,Tunnel'.split(','))
}

def sanitize_include(cards, include):
Expand Down Expand Up @@ -53,7 +59,7 @@ def print_cards(cards):
def get_counts(names):
"""Determine the number of cards to draw from each set.

Examples:
Examples:
(Dominion) => counts = (10)
(Dominion,Prosperity) => counts = (5,5)
(Dominion,Prosperity,Intrigue) => counts = (3,3,4)
Expand Down