🗃️ Resource cleanup

This commit is contained in:
Nikolaj Danger
2020-08-03 15:11:24 +02:00
parent cd1eff01a0
commit 6ca2c80432
11 changed files with 42 additions and 49 deletions

View File

@ -24,7 +24,7 @@ def monsterFunc(command):
return("I don't know that monster... (error code 601)","","","","","")
else:
# Opens "mensters.json"
data = json.load(open('resources/monsters.json', encoding = "utf8"))
data = json.load(open('resources/lookup/monsters.json', encoding = "utf8"))
for monster in data:
if "name" in monster and str(command) == monster["name"]:
logThis("Found it!")
@ -125,7 +125,7 @@ def spellFunc(command):
logThis("Looking up "+command)
# Opens "spells.json"
data = json.load(open('resources/spells.json', encoding = "utf8"))
data = json.load(open('resources/lookup/spells.json', encoding = "utf8"))
if str(command) in data:
logThis("Returning spell information")
spell_output = ("***"+str(command)+"***\n*"+str(data[str(command)]["level"])+" level "+str(data[str(command)]["school"])+"\nCasting Time: "+str(data[str(command)]["casting_time"])+"\nRange: "+str(data[str(command)]["range"])+"\nComponents: "+str(data[str(command)]["components"])+"\nDuration: "+str(data[str(command)]["duration"])+"*\n \n"+str(data[str(command)]["description"]))