Merge pull request #215 from Sakimori/master
bring space branch up to par with current master
This commit is contained in:
commit
a082c267a1
14
README.md
14
README.md
|
@ -161,6 +161,20 @@ accepting pull requests, check the issues for to-dos.
|
||||||
- m;roman [number]
|
- m;roman [number]
|
||||||
- converts any natural number less than 4,000,000 into roman numerals, this one is just for fun.
|
- 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!
|
## patreon!
|
||||||
|
|
||||||
these folks are helping me a *ton* via patreon, and i cannot possibly thank them enough:
|
these folks are helping me a *ton* via patreon, and i cannot possibly thank them enough:
|
||||||
|
|
|
@ -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 leagues import league_structure
|
||||||
from league_storage import league_exists
|
from league_storage import league_exists
|
||||||
from flask import Flask, url_for, Response, render_template, request, jsonify, send_from_directory, abort
|
from flask import Flask, url_for, Response, render_template, request, jsonify, send_from_directory, abort
|
||||||
|
@ -187,8 +187,12 @@ def update_loop():
|
||||||
|
|
||||||
if "weather_message" in this_game.last_update[0].keys():
|
if "weather_message" in this_game.last_update[0].keys():
|
||||||
state["update_emoji"] = this_game.weather.emoji
|
state["update_emoji"] = this_game.weather.emoji
|
||||||
else:
|
elif "ishit" in this_game.last_update[0].keys() and this_game.last_update[0]["ishit"]:
|
||||||
state["update_emoji"] = "🏏"
|
state["update_emoji"] = "🏏"
|
||||||
|
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"] = "🗞"
|
||||||
|
|
||||||
if "steals" in this_game.last_update[0].keys():
|
if "steals" in this_game.last_update[0].keys():
|
||||||
updatestring = ""
|
updatestring = ""
|
||||||
|
|
|
@ -919,7 +919,7 @@ class LeagueLeadersCommand(Command):
|
||||||
|
|
||||||
class LeagueDivisionDisplayCommand(Command):
|
class LeagueDivisionDisplayCommand(Command):
|
||||||
name = "divisionstandings"
|
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."
|
description = "Displays the current standings for the given division in the given league."
|
||||||
|
|
||||||
async def execute(self, msg, command):
|
async def execute(self, msg, command):
|
||||||
|
@ -1251,15 +1251,15 @@ class OBLLeaderboardCommand(Command):
|
||||||
|
|
||||||
async def execute(self, msg, command):
|
async def execute(self, msg, command):
|
||||||
leaders_list = db.obl_leaderboards()[:15]
|
leaders_list = db.obl_leaderboards()[:15]
|
||||||
leaders = {}
|
leaders = []
|
||||||
rank = 1
|
rank = 1
|
||||||
for team, points in leaders_list:
|
for team, points in leaders_list:
|
||||||
leaders[team] = {"rank" : rank, "points" : points}
|
leaders.append({"name" : team, "points" : points})
|
||||||
rank += 1
|
rank += 1
|
||||||
|
|
||||||
embed = discord.Embed(color=discord.Color.red(), title="The One Big League")
|
embed = discord.Embed(color=discord.Color.red(), title="The One Big League")
|
||||||
for team in leaders.keys():
|
for index in range(0, len(leaders)):
|
||||||
embed.add_field(name=f"{leaders[team]['rank']}. {team}", value=f"{leaders[team]['points']} points" , inline = False)
|
embed.add_field(name=f"{index+1}. {leaders[index]['name']}", value=f"{leaders[index]['points']} points" , inline = False)
|
||||||
await msg.channel.send(embed=embed)
|
await msg.channel.send(embed=embed)
|
||||||
|
|
||||||
class OBLTeamCommand(Command):
|
class OBLTeamCommand(Command):
|
||||||
|
|
|
@ -89,7 +89,8 @@ class Starlight(Weather):
|
||||||
result.clear()
|
result.clear()
|
||||||
result.update({
|
result.update({
|
||||||
"text": f"{game.get_batter()} hits a dinger, but the stars do not approve! The ball pulls foul.",
|
"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:
|
else:
|
||||||
result["in_the_park"] = True
|
result["in_the_park"] = True
|
||||||
|
@ -313,7 +314,7 @@ class MeteorShower(Weather):
|
||||||
bat_team.score += 1
|
bat_team.score += 1
|
||||||
result.clear()
|
result.clear()
|
||||||
result.update({
|
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,
|
"text_only": True,
|
||||||
"weather_message": True
|
"weather_message": True
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue