fix soulscream display bug, fixed sac fly runs not scoring properly
This commit is contained in:
parent
25ab287529
commit
2ec0efefc9
2
games.py
2
games.py
|
@ -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]
|
||||
|
|
|
@ -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
|
|
@ -88,16 +88,16 @@ 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:
|
||||
player_json = ono.get_stats(player_name)
|
||||
db.designate_player(msg.author, json.loads(player_json))
|
||||
if not meme:
|
||||
await msg.channel.send(f"{player_name} is now your idol.")
|
||||
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.")
|
||||
try:
|
||||
player_json = ono.get_stats(player_name)
|
||||
db.designate_player(msg.author, json.loads(player_json))
|
||||
if not meme:
|
||||
await msg.channel.send(f"{player_name} is now your idol.")
|
||||
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.")
|
||||
|
||||
elif command == "showidol":
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue
Block a user