Commit Graph

47 Commits

Author SHA1 Message Date
Cal Corum
94f3b1dc97 fix: apply open-packs hotfix to cogs/economy.py
Port the Check-In Player pack fix from the hotfix branch to the legacy
economy.py cog (which production currently loads instead of economy_new).

- Filter auto-open pack types from the manual open-packs menu
- Add pretty_name fallback for hyphenated pack type names
- Add ruff noqa for pre-existing star import warnings

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 13:04:19 -05:00
Cal Corum
57a64127ba fix: daily check-in interaction migration + paperdex dupe detection
Fix 1 (closes #19): Complete the migration of daily_checkin to
discord.Interaction. Remove greeting = assignments and TODO comment;
replace await greeting.edit(...) with await interaction.edit_original_response(...).

Fix 2 (closes #23): Implement paperdex dupe detection in get_card_embeds().
Query cards API by player_id + team_id and display a 'Dupes' field on the
embed showing how many duplicate copies the team owns.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 23:42:43 -05:00
Cal Corum
55a3255b35 fix: use min_rarity/max_rarity for exact rarity targeting
All checks were successful
Build Docker Image / build (pull_request) Successful in 1m27s
The players/random API endpoint only accepts min_rarity and max_rarity,
not rarity. The previous fix silently did nothing because FastAPI ignores
unknown query parameters.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 23:37:11 -05:00
Cal Corum
c0af0c3d32 fix: pack rarity targeting, StratGame methods, HR detection (#20 #21 #22)
All checks were successful
Build Docker Image / build (pull_request) Successful in 1m19s
- Fix pack distribution to use exact rarity targeting (rarity=0 for
  Replacement, rarity=1 for Reserve) instead of max_rarity=1 which
  matched both tiers; applied to cogs/economy.py and
  cogs/economy_new/team_setup.py

- Add get_away_team() and get_home_team() async methods to StratGame
  dataclass, delegating to get_game_team() with the appropriate
  team_id; remove stale TODO comment from Game model

- Standardize home-run detection in complete_play(): set
  batter_final = batter_to_base when not None before the HR check,
  then only check batter_final == 4 (removes redundant batter_to_base
  path and the patch comment)

Closes #20, Closes #21, Closes #22

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 23:31:16 -05:00
Cal Corum
565afd0183 Normalize Player.franchise queries to use Team.sname
- Add FRANCHISE_NORMALIZE dict and helper to constants.py
- Update economy.py to normalize team_choice and use sname
- Update helpers/main.py franchise queries to use sname
- Update selectors.py to normalize franchise on player updates

Part of cross-era player matching fix for AI rosters

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 12:01:00 -06:00
Cal Corum
584a8a95ab Fix slash command decorators using wrong prefix command checks
Bug: Several slash commands (@app_commands.command) were using prefix command
decorators (@commands.has_any_role, @commands.check) which don't work with
app_commands. This caused errors caught by the global error handler, resulting
in "Unknown interaction" (404) errors being displayed before the command executed.

Affected commands:
- /comeonmanineedthis: Both role and channel checks were wrong
- /selldupes: Channel check was wrong
- /team: Channel check was wrong

Fix:
- Created app_legal_channel() decorator in helpers.py for slash commands
- Changed @commands.has_any_role to @app_commands.checks.has_any_role
- Changed @commands.check(legal_channel) to @app_legal_channel()

Bumps version to 1.7.5

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 07:29:08 -06:00
Cal Corum
0e3b98eb65 S10 Updates + PR Bugfix 2025-11-09 06:12:46 -06: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
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
Cal Corum
736897efad Added tag_from_second decision for AI
Flyball A and B complete
2024-11-04 00:12:35 -06:00
Cal Corum
512efe98c4 db_calls -> api_calls
gameplay_db -> gameplay_models
new-game campaign in progress
added Player model
2024-10-12 18:22:13 -05:00
Cal Corum
78bcdc07bf Add support for MVP packs with set team 2024-08-31 23:37:54 -05:00
Cal Corum
f7934d464f Refactoring gameplay AI / Automate subs 2024-05-19 02:12:35 -05:00
Cal Corum
cb6319cf29 Bring back market watch 2024-05-18 17:07:17 -05:00
Cal Corum
913689034c Fixed interaction bug 2024-05-17 15:22:54 -05:00
Cal Corum
a1c44a0540 Refactor /buy pack 2024-05-13 17:02:32 -05:00
Cal Corum
731862e006 Add support for Promo Choice pack 2024-05-13 15:35:57 -05:00
Cal Corum
a40c1c9e93 2024 Updates 2024-04-21 17:49:10 -05:00
Cal Corum
04201be18c Fix notifications and SUC gauntlet 2024-03-08 11:14:05 -06:00
Cal Corum
710d759d57 Move daily command to app_command 2024-03-07 21:25:10 -06:00
Cal Corum
726f8324ed Update economy.py
Refactor buy_card and add buy card-by-id
2023-11-19 12:29:04 -06:00
Cal Corum
e2e114d06a Add Task Loop Check 2023-11-17 22:17:40 -06:00
Cal Corum
16225aea13 Major League Campaign update
Prepping for Flashback campaign
2023-11-05 20:02:43 -06:00
Cal Corum
e46955a16d Bug fixes
Fixed end of gauntlet ping bug
Fixed "too many dupes" bug
2023-10-28 10:58:43 -05:00
Cal Corum
1ca1e538af MVP Pack fix & pcard update 2023-10-28 00:26:29 -05:00
Cal Corum
1c3e7ef148 Bug fixes & /record
- Added walk-off scenario for end-game
2023-10-26 00:36:36 -05:00
Cal Corum
8339eb63eb Add /lookup command & fix mvp choice pack 2023-10-24 23:44:42 -05:00
Cal Corum
d15050242a All-Star TC packs updated 2023-10-24 21:57:10 -05:00
Cal Corum
d6276ec22a Activate Cardset-Locked Team Choice packs 2023-10-24 14:08:37 -05:00
Cal Corum
f68a8166e7 2018 Cardset Update 2023-10-23 10:57:28 -05:00
Cal Corum
504a33f8f7 Hash update for marketplace 2023-09-12 21:06:04 -05:00
Cal Corum
f5bf7df166 DB calls to async 2023-05-03 13:28:14 -05:00
Cal Corum
49a0ce0d85 Season 5 Link Updates 2023-04-30 14:36:26 -05:00
Cal Corum
6b4e2de0ea Update economy.py
Add Team Choice packs with pre-selected teams to /open-packs
2023-04-30 14:26:23 -05:00
Cal Corum
b56fa21bfe Add Team Choice packs 2023-04-27 00:13:35 -05:00
Cal Corum
4b034f6cdd Update economy.py
typo + pack limit for new teams
2023-04-25 02:57:35 -05:00
Cal Corum
d3b775432c Update economy.py
Remove /refresh since API calls require human authorization
2023-04-25 01:42:54 -05:00
Cal Corum
f1f9b9676a Update economy.py
Check cardset availability for /buy
2023-03-28 11:19:22 -05:00
Cal Corum
aeb17cb7d1 Prep for gauntlet 1.0 2023-03-27 22:30:02 -05:00
Cal Corum
871eaa2c06 Move gauntlet commands to /gauntlets; add support for opening Mario packs 2023-03-25 00:04:27 -05:00
Cal Corum
ae18790279 Starting games functional 2023-03-19 17:53:59 -05:00
Cal Corum
f9e222d2f1 Functional draft 2023-03-19 13:59:26 -05:00
Cal Corum
a8a5028e07 /buy packs update complete 2023-03-11 17:56:36 -06:00
Cal Corum
ee8a332558 Add /open-packs and tweak pull rates for daily 2023-03-11 14:39:10 -06:00
Cal Corum
0c638ae6a5
Initial commit 2023-02-19 21:34:38 -06:00
Cal Corum
6549aa44fa
Initial commit 2020-07-07 13:57:47 -05:00