Show maximum number of randoms
This commit is contained in:
parent
93de038712
commit
fd47368d5a
1 changed files with 1 additions and 1 deletions
2
tools.py
2
tools.py
|
@ -825,7 +825,6 @@ def studio():
|
||||||
print("Nothing requested")
|
print("Nothing requested")
|
||||||
|
|
||||||
def randoms(specials=False):
|
def randoms(specials=False):
|
||||||
totalrandoms = int(input("How many? "))
|
|
||||||
pool = []
|
pool = []
|
||||||
for card in colors.cardlist:
|
for card in colors.cardlist:
|
||||||
if card["priority"] == 4 and card["dupe"] == False and card["colour"] != "sig" and card["colour"] != "limited":
|
if card["priority"] == 4 and card["dupe"] == False and card["colour"] != "sig" and card["colour"] != "limited":
|
||||||
|
@ -834,6 +833,7 @@ def randoms(specials=False):
|
||||||
else:
|
else:
|
||||||
if card["colour"] != "special":
|
if card["colour"] != "special":
|
||||||
pool.append(card["name"])
|
pool.append(card["name"])
|
||||||
|
totalrandoms = int(input("How many? (maximum " + str(len(pool)) + ") "))
|
||||||
try:
|
try:
|
||||||
chosen = sorted(random.sample(pool,totalrandoms))
|
chosen = sorted(random.sample(pool,totalrandoms))
|
||||||
print(", ".join(chosen))
|
print(", ".join(chosen))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue