Add little spell academia function

This commit is contained in:
mez 2025-08-03 22:40:37 +01:00
parent 63d654bd8a
commit a8783c9574

View file

@ -1795,14 +1795,39 @@ def natsume():
print("\n{\"event\":\"natsume’s book of cards " + theround + "\",\"date\":datetime.datetime(" + datetime.datetime.now().strftime("%Y,%-m,%-d") + "),\"url\":\"" + natsurl + "\",\"lost\":[\"" + "\",\"".join(finalgive) + "\"],\"received\":[\"" + "\",\"".join(finalwant) + "\"]}")
else:
print("Nothing can be swapped")
def lsa():
thephrase = input("Phrase: ").replace(" ","").lower()
holder = []
slots = len(thephrase)
while slots > 0:
holder.append("")
slots -= 1
nospecials = []
for card in colors.wantedlist:
if card["colour"] != "special":
nospecials.append(card["name"])
for card in nospecials:
index = 0
stop = False
while index < len(thephrase):
if not stop:
if holder[index] == "":
if thephrase[index] in card[:-2]:
holder[index] = card
stop = True
index += 1
print(", ".join(holder))
theround = input("\nRound number: ")
lsaurl = input("Comment URL: ")
print("\n{\"event\":\"little spell academia " + theround + "\",\"date\":datetime.datetime(" + datetime.datetime.now().strftime("%Y,%-m,%-d") + "),\"url\":\"" + lsaurl + "\",\"received\":[\"" + "\",\"".join(holder) + "\"]}")
if __name__ == "__main__":
while True:
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 Natsume’s Book of Cards 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"]
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 Natsume’s Book of Cards comment","Generate Little Spell Academia 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)])
@ -1858,5 +1883,7 @@ if __name__ == "__main__":
topwant(True)
elif chosen == "Generate Natsume’s Book of Cards comment":
natsume()
elif chosen == "Generate Little Spell Academia comment":
lsa()
print("\n")
input("Press Enter to continue or Ctrl-C to exit")