From 05d2f80107acf1b05263d108f1af73180da5946d Mon Sep 17 00:00:00 2001 From: Sakimori Date: Sat, 27 Feb 2021 16:26:56 -0500 Subject: [PATCH 1/7] fixed help template for division standings --- the_prestige.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/the_prestige.py b/the_prestige.py index 9b147fc..d49a911 100644 --- a/the_prestige.py +++ b/the_prestige.py @@ -919,7 +919,7 @@ class LeagueLeadersCommand(Command): class LeagueDivisionDisplayCommand(Command): name = "divisionstandings" - template = "m;divisionstandings [league name]\n[team name]" + template = "m;divisionstandings [league name]\n[division name]" description = "Displays the current standings for the given division in the given league." async def execute(self, msg, command): From 44fda5691e308e1501aee73a851b05aa4dc8a9a3 Mon Sep 17 00:00:00 2001 From: Sakimori Date: Sat, 27 Feb 2021 16:40:57 -0500 Subject: [PATCH 2/7] fixed oblstandings display --- the_prestige.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/the_prestige.py b/the_prestige.py index d49a911..37c9646 100644 --- a/the_prestige.py +++ b/the_prestige.py @@ -1251,15 +1251,15 @@ class OBLLeaderboardCommand(Command): async def execute(self, msg, command): leaders_list = db.obl_leaderboards()[:15] - leaders = {} + leaders = [] rank = 1 for team, points in leaders_list: - leaders[team] = {"rank" : rank, "points" : points} + leaders.append({"name" : team, "points" : points}) rank += 1 embed = discord.Embed(color=discord.Color.red(), title="The One Big League") - for team in leaders.keys(): - embed.add_field(name=f"{leaders[team]['rank']}. {team}", value=f"{leaders[team]['points']} points" , inline = False) + for index in range(0, len(leaders)): + embed.add_field(name=f"{index+1}. {leaders[index]['name']}", value=f"{leaders[index]['points']} points" , inline = False) await msg.channel.send(embed=embed) class OBLTeamCommand(Command): From b8b29886b093e9619c5ea3929841050144024ac2 Mon Sep 17 00:00:00 2001 From: Genderdruid Date: Sat, 27 Feb 2021 14:16:23 -0800 Subject: [PATCH 3/7] added descriptions of all old weathers to the readme --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 801cd8c..12cb7b4 100644 --- a/README.md +++ b/README.md @@ -161,6 +161,20 @@ accepting pull requests, check the issues for to-dos. - m;roman [number] - converts any natural number less than 4,000,000 into roman numerals, this one is just for fun. +## weathers +- all current simsim weathers are listed here with a short description of their effects except for the most recent weathers whose effects remain a mystery. + - supernova 🌟: makes all pitchers pitch worse. + - midnight 🕶: significantly increased the chance that players will attempt to steal a base. + - heavy snow ❄: occasionally causes the team's pitcher to bat in place of the scheduled batter. + - slight tailwind 🏌️‍♀: occasionally batters get a mulligan and start the at bat over if they would have gotten out, significantly more likely to happen for weaker batters. + - thinned veil 🌌: when a player hits a dinger, they end up on the base corresponding to the number of runs the dinger scored, 1st base if it's a solo home run, up to none base if it's a grand slam, resulting in 5 runs scoring. + - twilight 👻: occasionally turns outs into hit by causing the ball to go ethereal, preventing the fielder from catching it. + - drizzle 🌧: causes each inning to start with the previous inning's final batter on second base. + - heat wave 🌄: occasionally causes pitchers to be relieved by a random player from the lineup. + - breezy 🎐: occasionally swaps letters of a player's name, altering their name for the remainder of the game and changing their stats. + - starlight 🌃: current patch weather, effects will be revealed the next time weathers are added. + - meteor shower 🌠: current patch weather, effects will be revealed the next time weathers are added. + ## patreon! these folks are helping me a *ton* via patreon, and i cannot possibly thank them enough: From 57ef55e15cdc4b3a65400ccc9eb7c6a1b43cd436 Mon Sep 17 00:00:00 2001 From: Sakimori Date: Sun, 28 Feb 2021 13:37:43 -0500 Subject: [PATCH 4/7] fixed weather emoji for starlight procs --- weather.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/weather.py b/weather.py index 7e076a0..d611b66 100644 --- a/weather.py +++ b/weather.py @@ -89,7 +89,8 @@ class Starlight(Weather): result.clear() result.update({ "text": f"{game.get_batter()} hits a dinger, but the stars do not approve! The ball pulls foul.", - "text_only": True + "text_only": True, + "weather_message": True }) else: result["in_the_park"] = True From 5345450020517dc60783fb3c159a64caaf36a791 Mon Sep 17 00:00:00 2001 From: Sakimori Date: Sun, 28 Feb 2021 14:15:45 -0500 Subject: [PATCH 5/7] changed emoji for basic messages based on context --- main_controller.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/main_controller.py b/main_controller.py index c88631f..eb7719c 100644 --- a/main_controller.py +++ b/main_controller.py @@ -1,4 +1,4 @@ -import asyncio, time, datetime, games, json, threading, jinja2, leagues, os, leagues +import asyncio, time, datetime, games, json, threading, jinja2, leagues, os, leagues, gametext from leagues import league_structure from league_storage import league_exists from flask import Flask, url_for, Response, render_template, request, jsonify, send_from_directory, abort @@ -186,8 +186,12 @@ def update_loop(): if "weather_message" in this_game.last_update[0].keys(): state["update_emoji"] = this_game.weather.emoji - else: + elif "ishit" in this_game.last_update[0] and this_game.last_update[0]["ishit"]: state["update_emoji"] = "🏏" + elif this_game.last_update[0]["text"] == gametext.appearance_outcomes.walk: + state["update_emoji"] = "👟" + else: + state["update_emoji"] = "🗞" if "steals" in this_game.last_update[0].keys(): updatestring = "" From f83a385b5332204455329ac17c4d998f5c777968 Mon Sep 17 00:00:00 2001 From: Sakimori Date: Sun, 28 Feb 2021 14:16:36 -0500 Subject: [PATCH 6/7] fixed an inconsistency with meteor shower text --- weather.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weather.py b/weather.py index d611b66..8f0e8b2 100644 --- a/weather.py +++ b/weather.py @@ -314,7 +314,7 @@ class MeteorShower(Weather): bat_team.score += 1 result.clear() result.update({ - "text": f"{runner.name} wished upon one of the shooting stars, and was warped to None base!! 1 runs score!", + "text": f"{runner.name} wished upon one of the shooting stars, and was warped to None base!! 1 runs scored!", "text_only": True, "weather_message": True }) From afda9fe95d911b61072d889153e2f3021c6b78d2 Mon Sep 17 00:00:00 2001 From: Sakimori Date: Tue, 2 Mar 2021 02:47:08 -0500 Subject: [PATCH 7/7] fixed crashing bug on updates without text --- main_controller.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main_controller.py b/main_controller.py index eb7719c..b666684 100644 --- a/main_controller.py +++ b/main_controller.py @@ -186,9 +186,9 @@ def update_loop(): if "weather_message" in this_game.last_update[0].keys(): state["update_emoji"] = this_game.weather.emoji - elif "ishit" in this_game.last_update[0] and this_game.last_update[0]["ishit"]: + elif "ishit" in this_game.last_update[0].keys() and this_game.last_update[0]["ishit"]: state["update_emoji"] = "🏏" - elif this_game.last_update[0]["text"] == gametext.appearance_outcomes.walk: + elif "text" in this_game.last_update[0].keys() and this_game.last_update[0]["text"] == gametext.appearance_outcomes.walk: state["update_emoji"] = "👟" else: state["update_emoji"] = "🗞"