Correct level calculation, remove specials from tradeable low priority list

This commit is contained in:
mez 2025-05-08 20:28:23 +01:00
parent e2f89e9793
commit e9cda90ff2
2 changed files with 7 additions and 6 deletions

View file

@ -24,7 +24,7 @@ Python scripts to generate a mobile-friendly static site for tracking tcg cards
- =sig=: set to =True= when you have a signature card - =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= - =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 youre collecting - =highpriority=: a list of high priority decks youre collecting
- =trademedium=: whether to allow trading medium-priority cards away in exchange for high-priority cards - =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 - =tradepost=: URL of your trade post on Dreamwidth
- =faves=: a list of cards to showcase on the index page - =faves=: a list of cards to showcase on the index page
- =headerbackground=: an HTML colour to display behind your header image and set as a theme colour - =headerbackground=: an HTML colour to display behind your header image and set as a theme colour

View file

@ -1014,7 +1014,7 @@ def indexgen():
rank = "puma" rank = "puma"
elif len(cardlist) > 13500: elif len(cardlist) > 13500:
rank = "chartreux" rank = "chartreux"
elif len(cardlist) > 13500: elif len(cardlist) > 13200:
rank = "russian blue" rank = "russian blue"
elif len(cardlist) > 12900: elif len(cardlist) > 12900:
rank = "panther" rank = "panther"
@ -2011,10 +2011,11 @@ def searchgen():
precomma = False precomma = False
for card in cardlist: for card in cardlist:
if card["priority"] == 3: if card["priority"] == 3:
if precomma: if card["colour"] != "special":
content.write(", ") if precomma:
content.write("'" + card["name"] + "'") content.write(", ")
precomma = True content.write("'" + card["name"] + "'")
precomma = True
content.write("];\n const lpt = [") content.write("];\n const lpt = [")
precomma = False precomma = False
for card in cardlist: for card in cardlist: