diff --git a/README.org b/README.org index e872362..6d26022 100644 --- a/README.org +++ b/README.org @@ -25,6 +25,7 @@ Python scripts to generate a mobile-friendly static site for tracking tcg cards - =sig=: set to =True= when you have a signature card - =banner=: set to =True= when you have a player banner, and save this in =build/assets/= as =banner.png= - =highpriority=: a list of high priority decks you’re collecting + - =lowpriority=: a list of decks you’re collecting that aren’t in mass decks - =trademedium=: whether to allow trading medium-priority cards away in exchange for high-priority cards (special cards will not be listed as tradeable) - =tradepost=: URL of your trade post on Dreamwidth - =faves=: a list of cards to showcase on the index page @@ -33,7 +34,7 @@ Python scripts to generate a mobile-friendly static site for tracking tcg cards - =sketchprize=: prize you normally want for sketchpads in the art shop (1 or 2) - =collectthreshold=: minimum number of owned cards for putting a deck in the “collecting” category (all cards in mass decks will be included) - =mediumthreshold=: minimum number of owned cards for marking a deck as medium priority - - =massmediumthreshold=: minimum number of owned cards for marking a deck in a mass deck medium priority (should normally be lower than =mediumthreshold=) + - =collectingmediumthreshold=: minimum number of owned cards for marking a deck being collected as medium priority (should normally be lower than =mediumthreshold=) - =highthreshold=: minimum number of owned cards for marking a deck as high priority - =keepsig=: =True= if you always want to keep one copy of your signature, =False= if you want to make them all available for trading - =tradestatement=: statement to place on your trading page diff --git a/colors.py b/colors.py index 26c92a0..0464953 100644 --- a/colors.py +++ b/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("

mass collecting/keeping

\n