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

オープン 初心者向け
#13,173 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
88/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
java
領域
game-dev

調査の方向性

forge-gui-mobile/src/forge/adventure/util/RewardActor.java の344行目付近から開始します。そこでは報酬の所有数が計算されます。CardPool.countByName(PaperCard) は AdventurePlayer.current().isCommanderMode() が true の場合だけ使用し、他のモードでは印刷ごとの個数を維持します。完了とは、ショップカードと報酬カードが Commander モードで所有している各印刷を名前ごとに数え、既存の New バッジが修正後の個数を使用する状態を意味します。

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
Java
スター
2.7k
フォーク
1.1k
平均マージ
19時間 28分
マージ済み PR(30日)
316

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Card-Forge/forge のほかの issue

Card-Forge/forge の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。