import dice d6 = dice.makeDie(6) statRoll = dice.makeComplexDie(d6, 3) STATS=['strength', 'constitution', 'dexterity', 'intelligence', 'wisdom', 'charisma'] # for stat in STATS: # print stat, statRoll() # statValues={} # for i in range(1,7): # for j in range(1,7): # for k in range(1,7): # s = sum((i,j,k)) # if (statValues.has_key(s)): # statValues[s] += 1 # else: # statValues[s] = 1 # # print statValues statPopulation = 6*6*6 statDistribution = {3: 1, 4: 3, 5: 6, 6: 10, 7: 15, 8: 21, 9: 25, 10: 27, 11: 27, 12: 25, 13: 21, 14: 15, 15: 10, 16: 6, 17: 3, 18: 1} pMinStat={3: 216, 4: 215, 5: 212, 6: 206, 7: 196, 8: 181, 9: 160, 10: 135, 11: 108, 12: 81, 13: 56, 14: 35, 15: 20, 16: 10, 17: 4, 18: 1} pMaxStat={18: 216, 17: 215, 16: 212, 15: 206, 14: 196, 13: 181, 12: 160, 11: 135, 10: 108, 9: 81, 8: 56, 7: 35, 6: 20, 5: 10, 4: 4, 3: 1} minimumsByClass={ 'cleric (1ed)': {'strength': 3, 'constitution': 3, 'dexterity': 3, 'intelligence': 3, 'wisdom': 9, 'charisma': 3}, 'druid (1ed)': {'strength': 3, 'constitution': 3, 'dexterity': 3, 'intelligence': 3, 'wisdom': 12,'charisma': 15}, 'fighter (1ed)': {'strength': 9, 'constitution': 7, 'dexterity': 3, 'intelligence': 3, 'wisdom': 3, 'charisma': 3},
from dice import makeDie rollCounts = {k: 0 for k in range(1,101)} d10 = makeDie(10) for i in xrange(0,100000): rollCounts[(d10()-1) * 10 + d10()] += 1 for (roll, count) in rollCounts.iteritems(): print str(roll), '\t', count