Merge branch 'master' into gauntlets
This commit is contained in:
commit
3cafa06c06
@ -3,7 +3,7 @@ import logging
|
||||
import random
|
||||
|
||||
import pydantic
|
||||
from db_calls_gameplay import StratPlay, get_team_lineups
|
||||
from db_calls_gameplay import StratPlay, StratGame, get_one_lineup
|
||||
from db_calls import db_get, db_post
|
||||
from peewee import *
|
||||
from typing import Optional, Literal
|
||||
@ -466,3 +466,10 @@ def get_relief_pitcher(this_play: StratPlay, ai_team: dict, used_pitchers: list,
|
||||
'batting_order': 10,
|
||||
'after_play': this_play.play_num - 1
|
||||
}
|
||||
|
||||
|
||||
def get_pitcher(this_game: StratGame, this_play: StratPlay):
|
||||
p_team_id = this_game.away_team_id
|
||||
if this_play.inning_half == 'top':
|
||||
p_team_id = this_game.home_team_id
|
||||
return get_one_lineup(this_game.id, team_id=p_team_id, position='P', active=True)
|
||||
|
||||
@ -393,7 +393,7 @@ class Gameplay(commands.Cog):
|
||||
embed.add_field(
|
||||
name=f'SUBSTITUTION',
|
||||
value=f'The {game_state["pitcher"]["team"]["sname"]} have brought in '
|
||||
f'{new_pitcher["p_name"]} to pitch.'
|
||||
f'[{new_pitcher["p_name"]}]({new_pitcher["image"]}) to pitch.'
|
||||
)
|
||||
else:
|
||||
ai_note += f'- continue with auto-fatigued {game_state["pitcher"]["p_name"]}\n'
|
||||
|
||||
Loading…
Reference in New Issue
Block a user