fix: preserve batter at plate when half-inning ends on caught stealing #11
No reviewers
Labels
No Label
ai-changes-requested
ai-failed
ai-pr-opened
ai-reviewed
ai-reviewing
ai-working
ai-working
bug
enhancement
feature
in-queue
performance
security
tech-debt
todo
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cal/paper-dynasty-discord#11
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/cs-batter-skip-1.9.1"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary- When a half-inning ended on a Caught Stealing (or pickoff), the batter at the plate was incorrectly skipped in the next inning- The side-switch code in
complete_play()unconditionally advanced the batting order by +1 without checkingopponent_play.pa- Now checks whether the last play was a plate appearance before incrementing, matching the existing non-side-switch logic## Changes-command_logic/logic_gameplay.py:756— checkopponent_play.pa == 1before advancing batting order on side-switch-tests/command_logic/test_logic_gameplay.py— newtest_cs_end_of_inning_preserves_battertest simulating a full Top 1 → Bot 1 → Top 2 scenario-VERSION— bumped to 1.9.1## Testing- New test verified to FAIL without the fix (returns batter 5 instead of 4) and PASS with it- All 21 existing tests in test_logic_gameplay.py continue to pass046b35e5a5to1eda66a06c