Cal Corum
563820fe93
Remove debug print from is_game_over() causing stdout spam
...
Bug: The is_game_over() function contained a debug print statement that was
printing "1: " to stdout on every call. This was causing massive log spam
in Docker container output (thousands of lines) and making it difficult to
diagnose actual issues.
Fix: Remove the print(f'1: ') statement from line 3251.
Bumps version to 1.7.4
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 07:11:10 -06:00
Cal Corum
0163f24000
Fix null card_id in RosterLink causing IntegrityError
...
Previously, if get_card_or_none returned None (when a card ID from the
Google Sheet doesn't exist in the database), the code would create a
RosterLink with card=None, causing card_id to be null which violates
the NOT NULL constraint on the primary key.
Now we check if this_card is None before creating the RosterLink and
raise a CardNotFoundException with a helpful error message to guide
the user to fix their roster sheet.
Fixes the error: null value in column "card_id" of relation "rosterlink"
violates not-null constraint
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-15 09:15:07 -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
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
17680a2348
Added /substitution defense
2025-05-30 01:19:45 -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
cffc9380f1
Replacing 1998 Live with 1998 Season
2025-04-14 16:28:14 -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
8b8fa65023
Add lineup embed field without links
2025-02-28 22:24:11 -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
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
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
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
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
Cal Corum
4a76d59481
Check for AI fatigue
2025-01-26 02:20:29 -06:00
Cal Corum
36dbde848e
new_game_checks refactor
2025-01-24 10:08:11 -06:00
Cal Corum
965ceebd35
Add responders check to dropdowns
...
Add colors and insults to helpers
Finish /set commands with helpers post /new-game
Add POW check for pitchers
2024-12-27 22:33:25 -06:00
Cal Corum
724b8922f2
Update gauntlet get SP for new objects
...
Handle gamestates without full lineups
Added /set command for lineup and SP
Fixed uncapped hit bugs
Added league_name property to Games
Fix get_team for gauntlets
Fixed SelectSP dropdown bug
2024-12-27 16:12:25 -06:00
Cal Corum
3db25b177a
Refactor new game checks
...
Trail batter-runner on uncapped hits
2024-12-26 14:36:04 -06:00
Cal Corum
fa109442c2
Added range embeds to uncapped hits
...
Update gbA with runner on 3rd
2024-12-26 07:04:00 -06:00
Cal Corum
c3c88af14a
Fixed HR unearned bug
...
Added pitching statline
2024-12-25 19:30:23 -06:00
Cal Corum
f40347e0bb
Fixed chaos button bug
...
Added batting statline to batter & OT to catchers
2024-12-25 16:10:24 -06:00
Cal Corum
9dbd7896c4
Add PB to catcher string
...
Fix chaos interaction bug
2024-12-25 15:00:22 -06:00
Cal Corum
ac7b564e67
Fixed extra innings wpa bug
...
Fix earned run bug
Fix HBP batter_final
Fixed poop line
2024-12-24 23:32:47 -06:00
Cal Corum
7015fb3125
Added baserunning ai notes
...
Added get_batter_card to gameplay_queries
2024-12-24 21:08:00 -06:00
Cal Corum
c7b45aecf4
Fixed only_forced bug
...
Fixed scouting caching bug
2024-12-24 16:11:28 -06:00
Cal Corum
7f6472bbc6
Batter subs plus cleanup
2024-12-23 10:09:11 -06:00
Cal Corum
95ee071ef8
Add DTwentyRoll
...
Add /log lineout
Add ManagerAi.tag_from_third()
2024-12-06 20:41:38 -06:00
Cal Corum
1e9e79916f
Added /log frame-check
...
Fixed game-summary error
2024-12-06 11:56:56 -06:00
Cal Corum
8118b4a691
Added PO/FO to fielding roll
...
Complete /log xcheck and /log groundball
2024-12-06 00:46:49 -06:00
Cal Corum
d6d3d7beb0
Log stealing done
...
Log xchecks started
2024-11-25 13:17:51 -06:00
Cal Corum
073bd04b4b
Added RosterLinks to remove card_id from setup process
...
Add SelectStartingPitcher dropdown
New .sync function
2024-11-23 19:53:48 -06:00
Cal Corum
a4af7652fc
ask_confirm bug fix
...
manual_end_game complete
2024-11-21 10:38:39 -06:00
Cal Corum
7a718d45f0
AbRoll and JumpRoll objects
...
Add handedness to pitcher/batter
2024-11-20 21:31:31 -06:00
Cal Corum
f7685ff0e3
Added AbRoll and JumpRoll
...
Added auto_roll and roll_buttons to Game
Added log chaos
2024-11-17 14:57:54 -06:00
Cal Corum
baffabfe4c
Bunts are done
2024-11-16 01:34:02 -06:00
Cal Corum
3d333dabc3
Update api logging
...
New Position exception
Pull scouting data with lineups
More bunt types
String validation on gameplay models
AI Defensive alignment
2024-11-16 00:31:54 -06:00
Cal Corum
bfd72ae0f5
Update logging to RotatingFileHandler
...
Add auto game end
Calculate stats and decisions
Support raising instantiated exceptions
2024-11-09 23:14:54 -06:00