From 557f0068847b05680b4f0f09a59ccfc03f65e460 Mon Sep 17 00:00:00 2001 From: Mez Date: Sun, 17 Aug 2025 10:59:22 +0100 Subject: [PATCH] Warn when decks with pending cards are in the top wants list --- tools.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/tools.py b/tools.py index 8cc40c9..f17be48 100644 --- a/tools.py +++ b/tools.py @@ -1553,9 +1553,22 @@ def topwant(special=False): wantedch.append(card["name"]) showcards = int(input("How many to show? ")) if special: - print(", ".join(wantedsp[:showcards])) + thecards = wantedsp[:showcards] else: - print(", ".join(wantedch[:showcards])) + thecards = wantedch[:showcards] + caution = [] + for card in colors.pends: + for thecard in thecards: + if thecard[:-2] == card[:-2]: + caution.append(thecard[:-2]) + caution = sorted(list(dict.fromkeys(caution))) + print(", ".join(thecards)) + if len(caution) > 0: + print("Caution: cards from " + ", ".join(caution) + " in pending list") + # if special: + # print(", ".join(wantedsp[:showcards])) + # else: + # print(", ".join(wantedch[:showcards])) def swapstation(): swappablemedium = []