How do you require a State with YEP Equip Requirements?

I have a couple of different dual wielding modes that I'm representing by toggleable states. What I need to be able to do in the Weapon note entries for it to work right, is to give this plugin some Lunatic Mode instructions to limit certain weapons from being equipped in one or both of those states.

Does anyone know how to do this?
( Plugin link: http://yanfly.moe/2016/02/27/yep-75-equip-requirements/ )

Yes, looks like you'll need to use the Lunatic notetag. Try this:
Code:
<Custom Equip Requirement Condition>
if (user.isStateAffected(5)) {
  condition = true;
} else {
  condition = false;
}
</Custom Equip Requirement Condition>
Just change the 5 to match your state's ID. 😤

I think if you have any other equip conditions on the item, those will need to be converted to JS and included in the Lunatic tag. 😅
Thanks! All of my tests have that code working perfectly. :LZYgrin:

Original thread: https://forums.rpgmakerweb.com/threads/how-do-you-require-a-state-with-yep-equip-requirements.105665/