If it's just for some enemy troups, you can make a Troop Event that is triggered after each action and checks, if all party members are affected or not.
You can use something like this:
Code:
Turn switch "at least one Actor unaffected" OFF
Conditional Branch: Harold in Party
Conditional Branch: Harold affected
..
else
Turn switch "at least one Actor unaffected" ON
end
end
.. repeat for all Actors
Conditional Branch: Switch "at least one Actor unaffected" is OFF
Game Over
You can do this without checking for individual actors and instead checking the actual party members, like this:
EDIT: Alright, the party member script calls don't seem to work like I thought, so here's some event commands and script calls you can use:
Control Variables > Set > Game Data > Party > Member 1
This will return the ActorId of whomever is the first party member and save it into a variable. If there's no one in that slot, it will return 0.
You can use this script call inside a conditional branch to check if the value of the variable is not 0 (meaning, if the slot isn't empty)
Code:
$gameVariables.value(1) !== 0;
Now, you can use this inside a conditional branch to check if the actor is affected by either Knockout status or Petrify:
Code:
$gameActors.actor($gameVariables.value(variableId)).isStateAffected(StateId-Knockout) || $gameActors.actor($gameVariables.value(variableId)).isStateAffected(StateId-Petrify);