fix!(lua.endpoints): allow rearrange of jokers/consumables during ROUND_EVAL and BLIND_SELECT

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

@S1M0N38 ci sta già lavorando.

Dal 1/7/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

completed-in-dev

The rearrange endpoint rejects valid reordering of jokers and consumables during ROUND_EVAL and BLIND_SELECT that the game permits. Verified against vendors/lovely/dump/.

Bug

src/lua/endpoints/rearrange.lua requires_state omits ROUND_EVAL and BLIND_SELECT, so reordering jokers or consumables mid-eval or during blind selection returns INVALID_STATE.

The game allows it: CardArea:set_ranks() (cardarea.lua:245 in the dump) sets states.drag.can = true based purely on area type. Both G.jokers and G.consumeables are created with type = 'joker' (game.lua:2291/2297), so they fall into the else branch with no state guard.

Only jokers and consumables are affected; hand cards are not (no hand is shown in these states, and the hand branch is already correctly restricted to SELECTING_HAND/SMODS_BOOSTER_OPENED).

Fix

Add G.STATES.ROUND_EVAL and G.STATES.BLIND_SELECT to requires_state and to the completion-detection state lists for the jokers/consumables branches (~L215, ~L221). Leave the hand branch unchanged.

Sibling of #202, #203–#206.

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.