Implement reserve vs. replacement card tracking in pack distribution #20

Closed
opened 2026-02-20 06:50:55 +00:00 by cal · 2 comments
Owner

cogs/economy.py:1331 and cogs/economy_new/team_setup.py:286 both have # TODO: track reserve vs replacement. Current logic always uses max_rar = 1 regardless of team composition, skipping the intended balancing logic.

`cogs/economy.py:1331` and `cogs/economy_new/team_setup.py:286` both have `# TODO: track reserve vs replacement`. Current logic always uses `max_rar = 1` regardless of team composition, skipping the intended balancing logic.
cal added the
bug
todo
labels 2026-02-20 06:50:55 +00:00
cal added the
ai-working
label 2026-03-05 15:01:25 +00:00
Author
Owner

PR #66 opened: #66

Fix: The else branch (draw Reserve cards) was using max_rarity=1, which allows both Replacement (0) and Reserve (1) cards. Changed both the infielder and outfielder loops in cogs/economy.py and cogs/economy_new/team_setup.py to use min_rarity=rar, max_rarity=rar — matching the exact-tier pattern used in gauntlets.py. Added RARITY import to team_setup.py. Removed the TODO comments.

PR #66 opened: https://git.manticorum.com/cal/paper-dynasty-discord/pulls/66 **Fix**: The `else` branch (draw Reserve cards) was using `max_rarity=1`, which allows both Replacement (0) and Reserve (1) cards. Changed both the infielder and outfielder loops in `cogs/economy.py` and `cogs/economy_new/team_setup.py` to use `min_rarity=rar, max_rarity=rar` — matching the exact-tier pattern used in `gauntlets.py`. Added `RARITY` import to `team_setup.py`. Removed the TODO comments.
Author
Owner

Fixed in PR #106. The reserve/replacement balancing loop in cogs/economy.py and cogs/economy_new/team_setup.py now uses exact ('rarity', 0) for Replacement-only targeting and ('rarity', 1) for Reserve-only targeting, replacing the max_rarity=1 that was incorrectly matching both tiers.

Fixed in PR #106. The reserve/replacement balancing loop in `cogs/economy.py` and `cogs/economy_new/team_setup.py` now uses exact `('rarity', 0)` for Replacement-only targeting and `('rarity', 1)` for Reserve-only targeting, replacing the `max_rarity=1` that was incorrectly matching both tiers.
cal added
ai-pr-opened
and removed
ai-working
labels 2026-03-23 04:32:01 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cal/paper-dynasty-discord#20
No description provided.