[Adventure] Commander mode: "Owned" count on shop/reward cards should count all printings
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 88/100
Research direction
Start in forge-gui-mobile/src/forge/adventure/util/RewardActor.java around line 344, where the reward's owned count is calculated. Use CardPool.countByName(PaperCard) only when AdventurePlayer.current().isCommanderMode() is true, preserving per-printing counts in other modes. Done means shop and reward cards count every owned printing by name in Commander mode, and the existing New badge uses the corrected count.
Written by the indexing model from the issue text.
Description
Is your feature request related to a problem? Please describe.
In Adventure Commander mode, shop and reward cards show Owned: 0 (or the "New" badge) for a card I already own if the one on offer is a different printing. For example, a shop offers a Sol Ring and shows Owned: 0. I buy it, and my collection then shows 2 Sol Rings, because my first one came from another set.
Commander is singleton, so the useful question is "do I already have this card?", not "do I have this exact printing?" Shops and rewards regularly offer other printings: set-themed shops, enemy deck loot, boosters.
The count comes from RewardActor (line 344), which matches the exact printing:
int ownedCount = AdventurePlayer.current().getCollectionCards(true).count(reward.card);
Describe the solution you'd like
In Commander mode, count owned copies by card name. CardPool.countByName(PaperCard) already exists, so this could be a small change:
var pool = AdventurePlayer.current().getCollectionCards(true);
int ownedCount = AdventurePlayer.current().isCommanderMode()
? pool.countByName(reward.card)
: pool.count(reward.card);
The "New" badge is driven by the same value, so it would also stop showing for printings of cards you already own. Non-Commander Adventure keeps the current per-printing count. Auto-sell isn't touched, since it already has its own "Auto-sell variants of owned cards in Commander" option.
Describe alternatives you've considered
Always counting by name, in every mode. That's simpler, but players collecting specific printings or arts outside Commander might want the per-printing count.
Showing both, e.g. Owned: 0 (1 any printing). That's more informative, but busier on small screens.
A game setting/option that toggled the behavior between multiple possible counting modes.
Additional context
- Dominant language
- Java
- Stars
- 2.7k
- Forks
- 1.1k
- Avg merge
- 19h 28m
- Merged PRs (30d)
- 316
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Card-Forge/forge
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Card-Forge/forge#13092 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Card-Forge/forge#12877 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Card-Forge/forge#12710 ·
Maintainers usually reply within 1 day
-
Shandalar "The Drunken Plea" quest completes prematurelyMay be free again @Simisays claimed this 37 days ago, and no pull request is open. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Card-Forge/forge#12306 · 1 assignee ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
Card-Forge/forge#12206 ·
Maintainers usually reply within 1 day
All issues in Card-Forge/forge
Similar issues
-
Difficulty 1/5 1-3 hours Newbie friendliness 92/100
HexaHexes/neoforge-mod-template#124 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
OpenLiberty/open-liberty#36410 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
erkamyaman/rust-anything#1153 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day