fix!(lua.utils): remove dead EDITION branch from card set extractor
- Dominant language
- Python
- Stars
- 72
- Forks
- 18
- PR merge metrics
- No merged PRs in 30d
Description
## Problem
`extract_card()` in `src/lua/utils/gamestate.lua` (lines 316-317) has an unreachable branch:
```lua
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.
Contributor guide
Assessment
This issue has not been assessed yet.