🗃️ Resource cleanup
This commit is contained in:
@ -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"]))
|
||||
|
Reference in New Issue
Block a user