How to make conflicting equipment

For example, actor A can equip C or D, but he can not equip C and D at one time?

or, First, actor A can equip one of sword(weapon), shield(shield), bow(weapon) but arrow(shield) independently.
Then he can equip sword and shield at one time.
Then he can equip arrow when bow is equipped.
And he can not equip shield when bow is equipped.

i try to find some way from YEP-EquipRequirements, but i cannot find other key word about equip,
'user.weapon()' , 'user.wtype()' or '$dataWeapons[$gameActors.actor(user.id())._equips[0]._itemId].etypeId()'
but no one is useful.

<Custom Equip Requirement Condition>
if (user.name() === 'Harold') {
condition = true;
} else {
condition = false;
}
</Custom Equip Requirement Condition>
Another way to perform the bow and arrow is as follows:
Make 'Arrow' an armor equipment. On all your bows, add the traits Equip Armor (Arrow) and Seal Equip (shield). This makes sure that when bows are equipped, you can equip arrows but not shields.
But how to hide Arrow or Shield when it is sealed?
Another way to perform the bow and arrow is as follows:
Make 'Arrow' an armor equipment. On all your bows, add the traits Equip Armor (Arrow) and Seal Equip (shield). This makes sure that when bows are equipped, you can equip arrows but not shields.
A simple solution would be instead of Weapon and Shield use Right and Left hand and have Shield and Arrow be Left Hand equip slot armor types. A not so simple solution would require a plugin that can do that sort of wizardry with the equip slots.
I got it!!

Need to rewrite YEP_X_EquipRequirements line 560 to:
if (!this.hasSkill(skillId)) return false;

First create a new skill type "Equipped" and do not have to add it to any actor or class.
Then add a skill "Bow is equipped" to the skill type and all "bow" weapon (you can add seal skill "Can equip shield" to bow weapon).
final add a equip requirement : "skill : Bow is equipped" to arrow.

Follow these you can realize the equip system of DIABLO II.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-conflicting-equipment.102639/