- "True iff the leader is not restricted AND there is some non-leader alive member who is not restricted":
const leader = $gameParty.leader(); !leader.isRestricted() && $gameParty.aliveMembers().some(actor => actor !== leader && !actor.isRestricted())
(I've usedArray#somehere, which terminates early if it finds a match.)
- "True iff the leader is not restricted AND the total number of non-restricted alive members is 2 or more":
!$gameParty.leader().isRestricted() && $gameParty.aliveMembers().reduce((total, actor) => !actor.isRestricted ? total + 1 : total, 0) >= 2
(I've usedArray#reducehere to avoid creating a new array.)
I'd suggest one of these: