Old border occasional wrong printings showing up

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

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

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

評価

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

調査の方向性

forge-core/src/main/java/forge/item/PaperCardPredicates.java、特に 67-92 行付近の printedInAnyEditions() を読みます。Badlands|30A の例を許可された 3ED エディションと照合し、その後、許可されていないエディションのカードオブジェクトは通過せず、許可された印刷版は通過することを確認します。allowedEditions が実際のカードのエディションをフィルタリングし、この述語を使用しないパスには影響しなければ完了です。

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

説明

Adventure keep

Dear devs, old border mod has an issue that can't be resolved in the config folder. It's with how allowedEditions is processed in

forge-core/src/main/java/forge/item/PaperCardPredicates.java (lines 67-92)

**Method: **printedInAnyEditions()

**Problem: **The predicate checks if the card name was printed in any allowed edition, then allows all printings of that card to pass - including printings from disallowed editions.

Example: Badlands|30A passes because Badlands exists in 3ED (allowed), but the actual card object is from 30A (not allowed).

**Fix: **We could change line 91 from:
return passes;
to:
return editions.contains(card.getEdition());

I think this fix shouldn't affect vanilla adventure because it doesn't use allowedEditions and so this predicate isn't called.

I've tried to solve it by inverting and using restrictedEditions instead, but then for some reason the PRM (Magic Online Promos) set forces its way in, even passed the restrictedEditions filter. And then there is a noticable lag when entering towns, maybe because the filter list is so long and I have to manually restrict a bunch more individual cards.

For old border and other planes mods, it would be preferential to use allowedEditions, because then we don't have to update config.json when a new set comes out.

Maybe there's a better solution I am not seeing.

Thanks for your help!

Image
主要言語
Java
スター
2.7k
フォーク
1.1k
平均マージ
1日 8時間
マージ済み PR(30日)
344

環境構築

はじめの一歩

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

Card-Forge/forge のほかの issue

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

似ている issue

Java の issue をもっと見る

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

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