fix soulscream display bug, fixed sac fly runs not scoring properly

This commit is contained in:
Sakimori 2020-12-23 18:02:55 -05:00
parent 25ab287529
commit 2ec0efefc9
3 changed files with 12 additions and 12 deletions

View File

@ -212,11 +212,11 @@ class game(object):
return runs
elif "advance" in outcome.keys():
runs = 0
if self.bases[3] is not None:
self.bases[3] = None
runs = 1
if self.bases[2] is not None:
runs = 0
run_roll = random.gauss(math.erf(random_star_gen("baserunning_stars", self.bases[2])-def_stat)-.5,1.5)
if run_roll > 0:
self.bases[3] = self.bases[2]

View File

@ -24,6 +24,6 @@ def get_scream(username):
if scream is not None:
return scream
else:
scream = get_stats(username)["soulscream"]
scream = json.loads(get_stats(username))["soulscream"]
db.cache_soulscream(username, scream)
return scream

View File

@ -88,7 +88,7 @@ async def on_message(msg):
if len(player_name) >= 70:
await msg.channel.send("That name is too long. Please keep it below 70 characters, for my sake and yours.")
return
#try:
try:
player_json = ono.get_stats(player_name)
db.designate_player(msg.author, json.loads(player_json))
if not meme:
@ -96,8 +96,8 @@ async def on_message(msg):
else:
await msg.channel.send(f"{player_name} is now {msg.author.display_name}'s idol.")
await msg.channel.send(f"Reply if {player_name} is your idol also.")
#except:
#await msg.channel.send("Something went wrong. Tell 16.")
except:
await msg.channel.send("Something went wrong. Tell 16.")
elif command == "showidol":
try: