All - I'm finishing up some moderate engine fixes and improvements and came across one I'd like some help on.
As you know, there are double-switches in the engine at the start of an inning. I'm trying to introduce double-switches in the middle of an inning when a reliever enters.
Here's the most common real-life scenario:
7th inning, Team A up by 3.
Team B gets a couple runners on.
Team A opts to bring in relief pitcher.
Pitcher spot is due up 2nd next inning.
Manager makes double-switch, with new left-fielder entering in P slot, P entering in LF slot.
Now, reliever can stay in beyond this inning half and won't be lifted for a PH.
Trying to do that in the engine is proving difficult because defensive replacements and/or player rest moves are done at the beginning of the inning half. So, if a reliever needs to be brought in, the manager can't find anyone on the def rep or player rest hierarchy to enter because they've already entered.
I've been thing of a couple ideas:
1) Consider bringing in a player rest player as part of double-switch 1 inning earlier than settings specified.
2) Consider holding off on 1 player rest / def rep if pitcher slot is due up next inning in the event of a pitching change. This gets a bit tricky because manage must decide which position to hold back (which factors in current spot in batting order) and must evaluate if pitcher will go more than one inning.
Let me know your thoughts and ideas. If you have any existing boxscores where you think a double-switch should have occurred while team is in field, please post link and mention inning half and team.