[Adventure] Commander mode: "Owned" count on shop/reward cards should count all printings

Open Beginner friendly
#13,173 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
88/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
java
Domain
game-dev

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Card-Forge/forge

All issues in Card-Forge/forge

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.