Need Help with a Yanfly custom plugin command

So in a game I'm working on, I have an actor who reflects magical attacks of most elements. Because of this, I want the stronger, more intelligent enemies in the game to know this and, during battle, not target her with their unique magical attacks. Yanfly's selection control plugin has a note tag to enforce this, but it can only apply to actors universally, which would render her elemental reflection completely useless and then no less intelligent enemies could target her with any magical attacks at all.


However, you can also set custom conditions for targeting on skills using Javascript, apparently. But having no knowledge of Javascript's language whatsoever, I don't know what to do to make this. Basically, I need a JS command that checks to see if the target's name is NOT this specific character's name, and if that condition returns true, then the attack goes through. If I knew how to check to see if something is not equal to something else in Javascript, I could do it myself, using the handy example on the plugin's info page (link here) as a base.


So could someone please help me out with this? Either by posting a modified version of the command on the plugin page or just telling me how to check for something not being a certain way so I can modify it myself.
Why just not use an eval with yanfly AI to say if the name of the actor = X or if the actor have a state to not target with this specific skill?
Why just not use an eval with yanfly AI to say if the name of the actor = X or if the actor have a state to not target with this specific skill?

I've been looking at that plugin and I don't see how I would do that, either...
There are examples you can easily follow in the plugin.


do you really need me to tell you what to write to copy paste it?
There are examples you can easily follow in the plugin.


do you really need me to tell you what to write to copy paste it?

In the plugin, which I read the entire help file for, none of the evals mention actor names. Don't get patronizing with me, the examples you speak of are literally not there.
In the plugin, which I read the entire help file for, none of the evals mention actor names. Don't get patronizing with me, the examples you speak of are literally not there.

72864e47a6.png



Alright, nevermind


Good luck.
72864e47a6.png



Alright, nevermind


Good luck.

Huh. I even read that part (speed reading, admittedly), but I guess I was focusing too much on looking for the word "actor"...


Thanks and sorry for snapping at you over my misconception.
You can just use:


<Custom Select Condition>


if (target.name() !=== 'Your Name') {


condition = true;


} else {


condition = false;


}


</Custom Select Condition>


Put this in the skill notebox.

Original thread: https://forums.rpgmakerweb.com/threads/need-help-with-a-yanfly-custom-plugin-command.72246/