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 return runs
elif "advance" in outcome.keys(): elif "advance" in outcome.keys():
runs = 0
if self.bases[3] is not None: if self.bases[3] is not None:
self.bases[3] = None self.bases[3] = None
runs = 1 runs = 1
if self.bases[2] is not None: 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) run_roll = random.gauss(math.erf(random_star_gen("baserunning_stars", self.bases[2])-def_stat)-.5,1.5)
if run_roll > 0: if run_roll > 0:
self.bases[3] = self.bases[2] self.bases[3] = self.bases[2]

View File

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

View File

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