Compare commits
No commits in common. "ab0c692141acb5ae08556799d57d6d990d36db75" and "a8783c95743ad9d812cf1974c7cf004b70c5169d" have entirely different histories.
ab0c692141
...
a8783c9574
1 changed files with 35 additions and 45 deletions
16
tools.py
16
tools.py
|
@ -406,6 +406,7 @@ def nextportfolio(monochrome=False):
|
|||
print("Master some more decks first")
|
||||
|
||||
def switchit():
|
||||
wantedbypriority = sorted(colors.wantedlist, key=lambda d: d["priority"])
|
||||
redtrade = []
|
||||
orangetrade = []
|
||||
yellowtrade = []
|
||||
|
@ -433,7 +434,7 @@ def switchit():
|
|||
elif card["colour"] == "gray":
|
||||
greytrade.append(card["name"])
|
||||
wantednames = []
|
||||
for card in colors.wantedlist:
|
||||
for card in wantedbypriority:
|
||||
wantednames.append(card["name"])
|
||||
wantall = []
|
||||
tradeall = []
|
||||
|
@ -1707,13 +1708,9 @@ def natsume():
|
|||
natsuwantgrouped.append(listone)
|
||||
listone = []
|
||||
listone.append(card)
|
||||
if index + 1 == len(natsuwant):
|
||||
natsuwantgrouped.append(listone)
|
||||
else:
|
||||
listone = []
|
||||
listone.append(card)
|
||||
if len(natsuwant) == 1:
|
||||
natsuwantgrouped.append(listone)
|
||||
index += 1
|
||||
index = 0
|
||||
for card in natsugivech:
|
||||
|
@ -1726,13 +1723,9 @@ def natsume():
|
|||
natsugivechgrouped.append(listtwo)
|
||||
listtwo = []
|
||||
listtwo.append(card["name"])
|
||||
if index + 1 == len(natsugivech):
|
||||
natsugivechgrouped.append(listtwo)
|
||||
else:
|
||||
listtwo = []
|
||||
listtwo.append(card["name"])
|
||||
if len(natsugivech) == 1:
|
||||
natsugivechgrouped.append(listtwo)
|
||||
index += 1
|
||||
index = 0
|
||||
for card in natsugivesp:
|
||||
|
@ -1745,19 +1738,16 @@ def natsume():
|
|||
natsugivespgrouped.append(listthree)
|
||||
listthree = []
|
||||
listthree.append(card["name"])
|
||||
if index + 1 == len(natsugivesp):
|
||||
natsugivespgrouped.append(listthree)
|
||||
else:
|
||||
listthree = []
|
||||
listthree.append(card["name"])
|
||||
if len(natsugivesp) == 1:
|
||||
natsugivespgrouped.append(listthree)
|
||||
index += 1
|
||||
natsugivechgrouped = natsugivechgrouped[:5]
|
||||
natsugivespgrouped = natsugivespgrouped[:5]
|
||||
finalwant = []
|
||||
finalgive = []
|
||||
for group in natsuwantgrouped:
|
||||
if len(finalwant) < 5:
|
||||
if group[0]["colour"] == "special":
|
||||
if len(natsugivespgrouped) > 0:
|
||||
if natsugivespgrouped[0][0][:-2] == group[0]["name"][:-2]:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue