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

Merged
NQNStudios merged 1 commits from heal-any-pc into master 2025-03-07 02:26:25 +00:00
NQNStudios commented 2025-03-06 02:17:43 +00:00 (Migrated from github.com)

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

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
Sign in to join this conversation.
No description provided.