diff --git a/tools.py b/tools.py index 9f69367..bb7aacd 100644 --- a/tools.py +++ b/tools.py @@ -825,7 +825,6 @@ def studio(): print("Nothing requested") def randoms(specials=False): - totalrandoms = int(input("How many? ")) pool = [] for card in colors.cardlist: 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: if card["colour"] != "special": pool.append(card["name"]) + totalrandoms = int(input("How many? (maximum " + str(len(pool)) + ") ")) try: chosen = sorted(random.sample(pool,totalrandoms)) print(", ".join(chosen))