Fix level calculation, allow collecting decks outside mass decks
This commit is contained in:
parent
5c3f54d280
commit
03c3cedb6b
3 changed files with 27 additions and 7 deletions
28
colors.py
28
colors.py
|
@ -132,7 +132,7 @@ for event in log.log:
|
|||
if thecard["priority"] == 0:
|
||||
if thedeck in variables.highpriority:
|
||||
thecard["priority"] = 1
|
||||
elif len(thecard["mass"]) > 0:
|
||||
elif len(thecard["mass"]) > 0 or thedeck in variables.lowpriority:
|
||||
thecard["priority"] = 3
|
||||
else:
|
||||
thecard["priority"] = 4
|
||||
|
@ -276,7 +276,7 @@ print("Calculating level")
|
|||
|
||||
if len(cardlist) + tradepend > 14400:
|
||||
rankcode = "rainbow"
|
||||
extra = len(cardlist) + tradepend - 14400
|
||||
extra = len(cardlist) + tradepend - 14401
|
||||
plusranks = int(extra / 300)
|
||||
if plusranks > 0:
|
||||
rank = "rainbow + " + str(plusranks)
|
||||
|
@ -463,8 +463,8 @@ for deck in decklist:
|
|||
deck["mastered"] = False
|
||||
if deck["name"] in variables.highpriority or deck["count"] >= variables.highthreshold or deck["name"] in portdecks or deck["colour"] == "limited":
|
||||
deck["priority"] = 1
|
||||
elif len(deck["mass"]) > 0:
|
||||
if deck["count"] >= variables.massmediumthreshold:
|
||||
elif len(deck["mass"]) > 0 or deck["name"] in variables.lowpriority:
|
||||
if deck["count"] >= variables.collectingmediumthreshold:
|
||||
deck["priority"] = 2
|
||||
else:
|
||||
deck["priority"] = 3
|
||||
|
@ -525,6 +525,24 @@ cardnames = []
|
|||
for card in cardlist:
|
||||
cardnames.append(card["name"])
|
||||
|
||||
for deck in variables.highpriority:
|
||||
if deck not in decknames:
|
||||
for number in numbers:
|
||||
wantedcard = {}
|
||||
wantedcard["name"] = deck + number
|
||||
wantedcard["colour"] = deckkey[deck]
|
||||
wantedcard["priority"] = 1
|
||||
wantedlist.append(wantedcard)
|
||||
|
||||
for deck in variables.lowpriority:
|
||||
if deck not in decknames:
|
||||
for number in numbers:
|
||||
wantedcard = {}
|
||||
wantedcard["name"] = deck + number
|
||||
wantedcard["colour"] = deckkey[deck]
|
||||
wantedcard["priority"] = 3
|
||||
wantedlist.append(wantedcard)
|
||||
|
||||
for theme in variables.masscollect:
|
||||
try:
|
||||
for deck in variables.masscollect[theme]["decks"]:
|
||||
|
@ -2180,7 +2198,7 @@ def massindexgen():
|
|||
os.remove(thefile)
|
||||
headerwrite(thefile,"mass")
|
||||
content = open(thefile,"a")
|
||||
content.write("<h1>mass collecting/keeping</h1>\n<ul>\n")
|
||||
content.write("<h1>mass collecting</h1>\n<ul>\n")
|
||||
massindex = 1
|
||||
for series in masslist:
|
||||
content.write("<li><a href=\"")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue