Is there a way to check if anybody in the party is inflicted with a certain state, not just a specific actor?

I have a few status effects called "sickness". While most of these can be cleared with just using the "pill" item, there are other more severe types of sickness status effects where I want the player to visit a nurse to have removed for a fee. However, I do not want the player to pay if none of the party members have any type of these sicknesses that cannot be removed with an item. Also, I do not want the nurse to remove all states, just the ones I want.

(This is why I do not like "recover all" because it removes all states including XP buffs and other buffs)

I looked in conditional branches and found that I only can choose specific actors for the conditional branches. Not if anybody in the party has a certain state.

Sure, I could nest a couple dozen conditional branches to check all avenues but that would get tedious and confusing very quickly.

Is there an easier way I can check to see if anybody has one of these few states and have the nurse remove them from the entire party (its a pay per visit rather than pay per character)
As far as I'm aware, you can only check individual states per actor by default, so you will have to use that conditional branch multiple times to just check each possible actor.

However, I want to point out...why not just have your Nurse Check become a Common Event?
So that you are not copying/pasting it over and over again for all your nurse stops? You can find the Common Event tab in your Settings if you're unfamiliar with them.

Just go through the process of making one very thorough check inside a Common Event, and then just use that Common Event call command in your actual game to save yourself the time.
New Method to let you check several states with a single call:

Ruby:
# * Has States? RG * #
#   2023-06-01

# * Script Call * #

# - For XP
#  $game_party.actors[ActorIndex].has_states?(state1, etc.)

# - For VX and VX ACE
#  $game_party.members[ActorIndex].has_states?(state1, etc.)

class Game_Actor
  def has_states?(*new_states)
    states_found = @states & new_states
    states_found.any?
  end
end

Original thread: https://forums.rpgmakerweb.com/threads/is-there-a-way-to-check-if-anybody-in-the-party-is-inflicted-with-a-certain-state-not-just-a-specific-actor.157985/