I am trying to create a state that activates when the actor has the highest MP (or shares the highest MP) in the party. I have tried using a script a friend experienced with javascript but not with RPG maker made me (below) but it does not appear to be working. Any help would be appreciated.
<Custom Passive Condition>
if (actor.mp === $gameParty.aliveMembers().reduce((max, actor) => max.mp > actor.mp ? max : actor); ) {
condition = true;
} else {
condition = false;
}
</Custom Passive Condition>
<Custom Passive Condition>
if (actor.mp === $gameParty.aliveMembers().reduce((max, actor) => max.mp > actor.mp ? max : actor); ) {
condition = true;
} else {
condition = false;
}
</Custom Passive Condition>