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

Aperta
#218 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@S1M0N38 ci sta già lavorando.

Dal 9/7/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

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.

Lingua principale
Python
Stelle
80
Fork
23
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

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 coder/balatrobot

Tutte le issue di coder/balatrobot

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.