fix!(lua.utils): remove dead EDITION branch from card set extractor

オープン
#218 コメント 0 件 リアクション 0 件 担当者 1 名 GitHub で見る

@S1M0N38 がすでに取り組んでいます。

2026年7月9日 から。

評価

この issue はまだ評価されていません。

説明

completed-in-dev

Problem

extract_card() in src/lua/utils/gamestate.lua (lines 316-317) has an unreachable branch:

elseif ability_set == "Edition" then
  set = "EDITION"

The matching value is advertised in the Card.Set alias: ---| "EDITION" # Card with an edition (src/lua/utils/enums.lua:81).

Why it's dead

Editions (foil/holo/polychrome/negative) are modeled as card.edition and surfaced in modifier.edition — orthogonal to a card's type. ability.set is only ever Joker/Tarot/Planet/Spectral/Voucher/Booster/Default/Enhanced, never Edition, so the branch never fires.

Empirically verified — added edition cards of every type × every edition and scanned the full gamestate: 0 cards report set == "EDITION".

Card set modifier.edition
j_joker + polychrome JOKER e_polychrome
c_magician + negative TAROT e_negative
H_A + foil DEFAULT e_foil

The enums.lua comment # Card with an edition is also wrong — editions are modifiers, not a set.

Proposed fix

  • Remove the elseif ability_set == "Edition" branch from extract_card() (gamestate.lua).
  • Remove the ---| "EDITION" line from the Card.Set alias (enums.lua).
  • Regenerate openrpc.json.

Behavior-neutral (the branch never executes); no test coverage is affected.

主要言語
Python
スター
80
フォーク
23
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

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

coder/balatrobot のほかの issue

coder/balatrobot の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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