fix!(lua.utils): gamestate enhancement field uses localized text instead of stable key
- Dominant language
- Python
- Stars
- 72
- Forks
- 18
- PR merge metrics
- No merged PRs in 30d
Description
**Ref:** PR #190
## Description
After adding an enhancement to a playing card, the `modifier.enhancement` field in the gamestate response contains the localized text from `card.ability.effect` (e.g. `"BONUS"`) instead of a stable identifier. This breaks any automation that depends on reading the enhancement type, especially in non-English locales.
## Steps to Reproduce
1. Start a run
2. Add a playing card with an enhancement: `add({"key": "H_A", "enhancement": "BONUS"})`
3. Inspect the gamestate response
## Expected Behavior
`modifier.enhancement` should contain a stable, locale-independent key (e.g. `"m_bonus"`).
## Actual Behavior
`modifier.enhancement` contains `"BONUS"` — derived from the English string `"Bonus Card"` via `:gsub(" Card", "")`. This breaks in other languages.
## Environment
- **OS:** macOS
- **Lovely version:** 0.8.0
- **SMODS version:** v1.0.0~BETA-1221a
- **BalatroBot commit:** 084044e
## Files
- [60006.log](https://github.com/user-attachments/files/28841794/60006.log)
- [60006.req.jsonl.txt](https://github.com/user-attachments/files/28841795/60006.req.jsonl.txt)
- [60006.res.jsonl.txt](https://github.com/user-attachments/files/28841793/60006.res.jsonl.txt)
Contributor guide
Assessment
This issue has not been assessed yet.