MV Overworld effect for armor that only works if equipped?

I wanted to have specific floor tiles in overworld maps cause damage to the player, but if they've equipped a certain armor, the trap is highlighted and therefore can be avoided/is instantly avoided if the player steps on said trapped tile.

Conditional branches have no such option, only being able to take into account if the player has the armor in their inventory at all as opposed to only working if the armor is currently equipped.

I reckon there may be a script call I can use for this instead of having to add a whole new plugin? If so, I'd preferably need it to target only the 1st party member, whoever they currently are!
On the overworld, have a Common Event flag the player as no floor damage if they are wearing the armor, and remove it if they're not. Have each door into smaller maps simply remove that trait (you don't even have to test anything).

Or instead of having damage tiles on the map, just make them events. Or one event, if you want to get fancy: have an event track their position, and each time the variable doesn't match their previous position, change the previous position variable, and if they aren't wearing the armor, and they are in a coordinate in a certain range, inflict damage.
If you just want a script call to check if the first party member is wearing specific armor, this should do it:

Code:
$gameParty.members()[0].armors().some(a => a && a.id === X)

Replace X with the armor ID number.
If you just want a script call to check if the first party member is wearing specific armor, this should do it:

Code:
$gameParty.members()[0].armors().some(a => a && a.id === X)

Replace X with the armor ID number.
Thank you for the quick reply! This is exactly what I was looking for since what I'm working on has the player only control a single actor without party members, but that single actor can be changed to another later on.

By the way
On the overworld, have a Common Event flag the player as no floor damage if they are wearing the armor, and remove it if they're not. Have each door into smaller maps simply remove that trait (you don't even have to test anything).
Could you please explain this with pictures? Sounds like something I may want to use later on, but I'm not sure where to find these options.
Conditional branches have no such option, only being able to take into account if the player has the armor in their inventory at all as opposed to only working if the armor is currently equipped.
image.jpeg
I'm aware of this, however as I said I was looking for an option that affected strictly the 1st party member, no matter who they were. Thankfully NoNameWithoutAName helped out!
Ah, I see. I was just pointing out that "Conditional branches have no such option" is not factual, though. In any case, if you want the leader's armor you could also use:

$gameParty.leader().hasArmor($dataArmors[x]) where x is the id of the piece of armor. A bit easier to remember probably.

Original thread: https://forums.rpgmakerweb.com/threads/overworld-effect-for-armor-that-only-works-if-equipped.179237/