Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't display 'no item' response if another PC can shop. #679

Merged
merged 1 commit into from
Mar 7, 2025

Conversation

NQNStudios
Copy link
Collaborator

@NQNStudios NQNStudios commented Mar 6, 2025

In comments on #669 I outlined a way to intuitively handle shopping from a healer if the active PC is fully healed. This PR implements my suggestion. I think it feels pretty good and makes shopping better even outside the case that was buggy before: it's just nice to have the shop cycle between injured PCs if you're trying to buy healing for everyone.

These are the rules:

  • If the active PC gets an empty shop, iterate from the first to last PC until finding someone who can see a shop item
    • If none can shop, show the 'no item' response
  • When the active PC buys something, if this clears out the shop, iterate from the first to last PC until finding someone who can see a shop item
    • if none can see an item, stay on the empty shop of the PC that was active when the last item was bought.
  • When shopping ends, if the shop interface was the last thing to change the player's active PC, it puts it back how it was.

Fix #669

@CelticMinstrel CelticMinstrel merged commit 9ca2f05 into calref:master Mar 7, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Default no-items shop response is broken
2 participants