How do I prevent dead party members from going into battle?

Hi,

I was wondering if anyone knew if it was possible to exclude party members from joining a new battle if they are dead? I tried several searches on the topic but couldn't find anything.

Here's bit of context about how I want to use it:
  1. Using YEP_PartySystem I made my party have a max of 6
  2. Sometimes there will be battles that are 1v1, other times 2v2, etc. The limit is also set using the PartySystem plugin
  3. If a party member has died in a previous battle, I want the game to skip him and choose the next live member to join the battle. Pokémon works like this; if you need a reference.
Hope someone has an answer. Thanks in advance!

Original thread: https://forums.rpgmakerweb.com/threads/how-do-i-prevent-dead-party-members-from-going-into-battle.88150/