Commit Graph

357 Commits

Author SHA1 Message Date
Cal Corum
c043948238 CLAUDE: Fix gauntlet game creation and Event 9 issues
Multiple fixes to resolve PlayNotFoundException and lineup initialization errors:

1. gauntlets.py:
   - Fixed Team object subscriptable errors (use .id instead of ['id'])
   - Added fallback cardsets (24, 25, 26) for Event 9 RP shortage
   - Fixed draft_team type handling (can be Team object or dict)

2. cogs/gameplay.py:
   - Fixed gauntlet game creation flow to read field player lineup from sheets
   - Catches LineupsMissingException when SP not yet selected
   - Instructs user to run /gamestate after SP selection

3. utilities/dropdown.py:
   - Fixed SelectStartingPitcher to create own session instead of using closed session
   - Store game/team IDs instead of objects to avoid detached session issues
   - Added exception handling for failed legality check API calls

These changes fix the issue where gauntlet games would fail to initialize
because the SP lineup entry wasn't being committed to the database.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-09 18:56:38 -06:00
Cal Corum
07195f9ad3 CLAUDE: Add Event ID 9 (Live 25) gauntlet configuration
Fixed missing draft configuration for Event ID 9 "Live 25" gauntlet that was causing crashes when users tried to start a gauntlet run.

Changes:
- Added cardset configuration for Event 9 (cardsets 27, 28, 29)
- Added Event 9 to max_counts progressive difficulty logic
- Added Event 9 to draft_loop() events list
- Opponent configuration for Event 9 was already present

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-09 13:03:41 -06:00
Cal Corum
904dae9a47 Gauntlet Pack Type Update 2025-11-09 06:34:14 -06:00
Cal Corum
0e3b98eb65 S10 Updates + PR Bugfix 2025-11-09 06:12:46 -06:00
Cal Corum
80e94498fa CLAUDE: Add safe WPA lookup with fallback to prevent KeyError crashes
Implements defensive error handling for WPA (Win Probability Added) calculations when rare game states are missing from the static lookup table. The safe_wpa_lookup() function uses a three-tier fallback strategy: exact lookup, bases-empty fallback, and 0.0 default value.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-11 18:25:59 -05:00
Cal Corum
660c6ad904 Added search functionality to /player command 2025-10-08 14:45:41 -05:00
Cal Corum
b1d05309ef Cogs to Packages Groundwork 2025-08-17 08:46:55 -05:00
Cal Corum
c98c202224 Update gameplay_queries.py
Decision bug fixes
2025-07-23 08:58:41 -05:00
Cal Corum
3debfd6e82 Catchup commit
Includes discord_ui refactor, testing overhaul, addition of
2025-07-22 09:22:19 -05:00
Cal Corum
dd23d3657a Team Choice pack bug - not including cardset 2025-06-04 22:30:41 -05:00
Cal Corum
65abc8ed55 Remove outdate image links
Add S3 image links
Pull all fielding ratings at game start
2025-06-04 09:54:13 -05:00
Cal Corum
a4adf50ca1 Added discord bot object to complete game function 2025-06-01 09:44:16 -05:00
Cal Corum
b3fa68b80e Bug fixes for uncapped doubles 2025-05-30 21:16:51 -05:00
Cal Corum
6adf6e34b1 Gauntlet 8 team updates 2025-05-30 21:15:41 -05:00
Cal Corum
17680a2348 Added /substitution defense 2025-05-30 01:19:45 -05:00
Cal Corum
e9c9a3f392 dictionary to object bug fix 2025-05-29 21:54:46 -05:00
Cal Corum
e366564bef Adding gauntlet 8
Season 9 updates
Uncapped runs scored bug fixed
2025-05-29 21:54:16 -05:00
Cal Corum
6a355def4b Season 9 Updates 2025-05-03 19:38:29 -05:00
Cal Corum
cffc9380f1 Replacing 1998 Live with 1998 Season 2025-04-14 16:28:14 -05:00
Cal Corum
cb2637086e Live scorecard fix
Gauntlet entry string fix
2025-03-31 13:54:39 -05:00
Cal Corum
9218bd6047 Update cache reset command
Decrease cache limit to 3 days
Add kickstart live scorecard function
2025-03-09 14:20:30 -05:00
Cal Corum
92c7f47692 Advance trail runner when thrown at and safe 2025-03-09 13:21:08 -05:00
Cal Corum
36fd848b62 Bug fix: pitchers auto-fatigue one out too late 2025-03-09 13:07:09 -05:00
Cal Corum
a416e90db9 New postion sub logic 2025-03-09 00:59:10 -06:00
Cal Corum
35a62362ce Fix card cache bug 2025-03-09 00:58:47 -06:00
Cal Corum
cf4157a59d Increase scorebug timeout to 8 seconds 2025-03-09 00:58:15 -06:00
Cal Corum
8e35812cd3 Increase concurrent db connections
Decrease timeout on Scorebug buttons to reduce open connections
2025-03-03 22:13:40 -06:00
Cal Corum
579bde6c03 Updated lineup string 2025-02-28 22:48:34 -06:00
Cal Corum
8b8fa65023 Add lineup embed field without links 2025-02-28 22:24:11 -06:00
Cal Corum
61df90b2ea Update caching of pitcher and batter scouting 2025-02-23 23:23:59 -06:00
Cal Corum
9d831a9512 Post gamestate publicly if human team GM runs command 2025-02-23 23:20:54 -06:00
Cal Corum
f8aad38739 Update cache refresh logic to replace vs delete 2025-02-23 22:50:58 -06:00
Cal Corum
557404301a Fix fatigue bugs 2025-02-11 00:58:45 -06:00
Cal Corum
4d59247e5c Fix Steal + Overthrow on OBC 5 2025-02-11 00:10:53 -06:00
Cal Corum
b454912393 Remove 3B hold check for runner on 2nd 2025-02-10 23:51:56 -06:00
Cal Corum
50895fef90 Show charts on SPD checks
Fix gb chart with OBC 5, 7
Add 1998 to player command
2025-02-10 23:44:05 -06:00
Cal Corum
479a335373 Gauntlet evolution fix 2025-02-09 21:38:19 -06:00
Cal Corum
149c4f3ab9 Update play order to use play_num instead of id 2025-02-08 16:53:21 -06:00
Cal Corum
f6bae8c208 Local db to Postgresql 2025-02-08 04:11:04 -06:00
Cal Corum
8be5e94536 Fatigue logging 2025-02-06 15:47:07 -06:00
Cal Corum
d5f2978b01 Update new-game flow 2025-02-06 15:12:12 -06:00
Cal Corum
db52625899 Day 1 Gauntlet Updates
Baserunner advancement bug fixes
Pitcher sub bug fixes
2025-02-06 10:00:56 -06:00
Cal Corum
282a7e7ac2 Added live scorecard functionality
Added new pitcher embed highlighting
2025-02-05 11:30:56 -06:00
Cal Corum
c9b5b45961 Reliever bug 2025-02-05 09:41:06 -06:00
Cal Corum
fc130e6a98 Update buffer message for ballpark fly
Bolded new pitcher text
2025-02-03 13:58:51 -06:00
Cal Corum
9700a9abd6 Runner on 3rd, gb checks updated 2025-02-03 13:46:58 -06:00
Cal Corum
3b6bcfb186 Beta day 1 bug fixes 2025-02-02 22:01:33 -06:00
Cal Corum
cd9d5e49d0 Add confirmation_message param to ask_with_buttons 2025-02-01 21:33:12 -06:00
Cal Corum
7d54d9ea34 Add unlimited new-game
Add pitcher substitution
Add AI pitcher subs
2025-02-01 21:32:40 -06:00
Cal Corum
e850ee5519 Allow manual override of xcheck 2025-01-26 11:50:33 -06:00