Add wantlist head function
This commit is contained in:
parent
cf2a6185e3
commit
3e5c270b4f
1 changed files with 25 additions and 2 deletions
27
tools.py
27
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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue