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

Aperta Adatta ai principianti
#13,173 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
88/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
java
Ambito
game-dev

Direzione di ricerca

Inizia in forge-gui-mobile/src/forge/adventure/util/RewardActor.java intorno alla riga 344, dove viene calcolato il conteggio delle ricompense già possedute. Usa CardPool.countByName(PaperCard) solo quando AdventurePlayer.current().isCommanderMode() è vero, preservando i conteggi per stampa nelle altre modalità. Fatto significa che le carte del negozio e delle ricompense contano ogni stampa posseduta per nome in modalità Commander e il badge New esistente usa il conteggio corretto.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
Java
Stelle
2.7k
Fork
1.1k
Merge medio
19h 28m
PR unite (30g)
316

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Card-Forge/forge

Tutte le issue di Card-Forge/forge

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.