Multiple 'If' Factors (Yanfly Lunatic Mode)

For a dual tech skill I need it so two people are in certain states so that they can use it. Kind of like if they're both powered up they can use the combo skill.
So, I'm using Yanfly's Skill core in order to make it so it only shows up under certain conditions for both actors.
The basic set up is like this:

<Custom Show Eval>
if ($gameActors.actor(1).isStateAffected(42), ($gameActors.actor(2).isStateAffected(46)) {
visible = true;
} else {
visible = false;
}
</Custom Show Eval>

But that only makes it so that as long as actor 2 is active with the state than the skill appears. I want it so that BOTH states have to be active on their respective actors for the skill to be available. (As well as figure out how to give a lunatic mode script multiple conditions in general.)
Moved to: Javascript/Plugin Support
Couple of things:
  1. You have mismatched brackets: an extra ( just before $gameActors.actor(2).

  2. Logical operators are used to combine multiple true/false values, but you've used a comma. In JavaScript, the comma operator evaluates multiple statements and returns the value of the last one. I imagine that's why actor 1 was being ignored. 😅
Try this instead~
JavaScript:
<Custom Show Eval>
if ($gameActors.actor(1).isStateAffected(42) && $gameActors.actor(2).isStateAffected(46)) {
  visible = true;
} else {
  visible = false;
}
</Custom Show Eval>
Or, equivalently:
JavaScript:
<Custom Show Eval>
visible = $gameActors.actor(1).isStateAffected(42) && $gameActors.actor(2).isStateAffected(46);
</Custom Show Eval>
😤
Thanks, this worked perfectly. 😂

Original thread: https://forums.rpgmakerweb.com/threads/multiple-if-factors-yanfly-lunatic-mode.116643/