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.
The
rearrangeendpoint rejects valid reordering of jokers and consumables duringROUND_EVALandBLIND_SELECTthat the game permits. Verified againstvendors/lovely/dump/.Bug
src/lua/endpoints/rearrange.luarequires_stateomitsROUND_EVALandBLIND_SELECT, so reordering jokers or consumables mid-eval or during blind selection returnsINVALID_STATE.The game allows it:
CardArea:set_ranks()(cardarea.lua:245in the dump) setsstates.drag.can = truebased purely on area type. BothG.jokersandG.consumeablesare created withtype = 'joker'(game.lua:2291/2297), so they fall into theelsebranch 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_EVALandG.STATES.BLIND_SELECTtorequires_stateand to the completion-detection state lists for the jokers/consumables branches (~L215, ~L221). Leave the hand branch unchanged.Sibling of #202, #203–#206.