From cf2a6185e38ee4f9d9d7fcc40cb6ddf2bc8bbcbf Mon Sep 17 00:00:00 2001 From: Mez Date: Fri, 1 Aug 2025 20:41:13 +0100 Subject: [PATCH 1/3] Autofill art studio requests from wantlist --- tools.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/tools.py b/tools.py index d33b9ae..04e635a 100644 --- a/tools.py +++ b/tools.py @@ -698,7 +698,7 @@ def studio(): tradenormal = [] tradespecial = [] for card in colors.cardlist: - if card["priority"] == 4 and card["dupe"] == False: + if card["priority"] == 4: if card["colour"] != "sig" and card["colour"] != "limited": if card["dupe"]: if len(card["mass"]) == 0: @@ -785,10 +785,15 @@ def studio(): give.extend(random.sample(tradenormal,needednormal)) if neededspecial > 0: give.extend(random.sample(tradespecial,neededspecial)) - if choicewant > 0: - choicelist = input(str(choicewant) + " choice character cards: ").split(", ") - if specialwant > 0: - speciallist = input(str(specialwant) + " choice special cards: ").split(", ") + allwantch = [] + allwantsp = [] + for card in colors.wantedlist: + if card["colour"] == "special": + allwantsp.append(card["name"]) + else: + allwantch.append(card["name"]) + choicelist = allwantch[:choicewant] + speciallist = allwantsp[:specialwant] allwants = [] if dupeswant > 1: allwants.append(str(dupeswant) + " random cards") From 3e5c270b4f60287a510e91f9c97ae7adff3106a8 Mon Sep 17 00:00:00 2001 From: Mez Date: Fri, 1 Aug 2025 20:53:53 +0100 Subject: [PATCH 2/3] Add wantlist head function --- tools.py | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/tools.py b/tools.py index 04e635a..d92b448 100644 --- a/tools.py +++ b/tools.py @@ -1476,12 +1476,31 @@ def maketrade(): print("Nothing to trade") def masteredtoday(): + mastereddecks = [] for deck in colors.decklist: try: if deck["mastered"].date() == datetime.datetime.today().date(): - print(deck["name"]) + mastereddecks.append(deck["name"]) except: pass + if len(mastereddecks) > 0: + print(", ".join(masterreddecks)) + else: + print("No decks mastered today") + +def topwant(special=False): + wantedch = [] + wantedsp = [] + for card in colors.wantedlist: + if card["colour"] == "special": + wantedsp.append(card["name"]) + else: + wantedch.append(card["name"]) + showcards = int(input("How many to show? ")) + if special: + print(", ".join(wantedsp[:showcards])) + else: + print(", ".join(wantedch[:showcards])) def swapstation(): swappablemedium = [] @@ -1589,7 +1608,7 @@ if __name__ == "__main__": index = 0 # adapted from https://stackoverflow.com/a/64536882 indexValidList = [] print("Choose from the list:") - options = ["Generate next palette portfolio","Generate next monochrome portfolio","Generate Switch It Up request","Generate Swap Station request","Generate Go Fish comment","Generate Release Roulette comment","Generate Riku’s Favors comment","Generate art shop request","Generate art studio request","Check a trade offer","Propose a trade","Get a list of random cards from tradepile (excluding specials)","Get a list of random cards from tradepile (including specials)","Check a card in the collection","Check details of a deck","See decks mastered today","See some statistics about the collection"] + options = ["Generate next palette portfolio","Generate next monochrome portfolio","Generate Switch It Up request","Generate Swap Station request","Generate Go Fish comment","Generate Release Roulette comment","Generate Riku’s Favors comment","Generate art shop request","Generate art studio request","Check a trade offer","Propose a trade","Get a list of random cards from tradepile (excluding specials)","Get a list of random cards from tradepile (including specials)","Check a card in the collection","Check details of a deck","See decks mastered today","See most wanted character cards","See most wanted special cards","See some statistics about the collection"] for optionName in options: index = index + 1 indexValidList.extend([options.index(optionName)]) @@ -1639,5 +1658,9 @@ if __name__ == "__main__": swapstation() elif chosen == "Generate Release Roulette comment": roulette() + elif chosen == "See most wanted character cards": + topwant() + elif chosen == "See most wanted special cards": + topwant(True) print("\n") input("Press Enter to continue or Ctrl-C to exit") From b946ad3ddab42255cab16d8bced91a6e1e0cc123 Mon Sep 17 00:00:00 2001 From: Mez Date: Fri, 1 Aug 2025 20:59:11 +0100 Subject: [PATCH 3/3] Edit mastered decks function (without breaking it) --- tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools.py b/tools.py index d92b448..01b9771 100644 --- a/tools.py +++ b/tools.py @@ -1484,7 +1484,7 @@ def masteredtoday(): except: pass if len(mastereddecks) > 0: - print(", ".join(masterreddecks)) + print(", ".join(mastereddecks)) else: print("No decks mastered today")