fix(policy): unblock upgrade confirmation after card selection
This commit is contained in:
parent
2dc711a55c
commit
1e14680c39
2 changed files with 25 additions and 1 deletions
|
|
@ -119,7 +119,12 @@ class PolicyContext:
|
|||
if inventory_item(old) == inventory_item(new):
|
||||
return
|
||||
elif action == "combat_select_card":
|
||||
if len(screen.get("selected_cards") or []) <= len(pending.screen.get("selected_cards") or []):
|
||||
# Upgrade previews do not expose selected_cards. A ready upgrade
|
||||
# confirmation is completion evidence for the accepted selection.
|
||||
upgrade_ready = screen.get("mode") == "upgrade_select" and screen.get("can_confirm")
|
||||
selection_grew = (len(screen.get("selected_cards") or [])
|
||||
> len(pending.screen.get("selected_cards") or []))
|
||||
if not upgrade_ready and not selection_grew:
|
||||
return
|
||||
elif action == "select_bundle":
|
||||
if not screen.get("preview_showing") or not screen.get("can_confirm"):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue