Please help. Copy and pasted this snippet of code from the Yanfly tips and tricks page to check to make sure a certain weapon is equipped. However when I set everything up it only applies the bonus atk and doesn't actually check the equipped weapons.
<Custom Passive Condition>
var weapons = user.weapons();
var 1 Hand Sword = 1;
condition = false;
for (var i = 0; i < weapons.length; ++i) {
var weapon = weapons;
if (weapon && weapon.wtypeId === 1 Hand Sword) {
condition = true;
break;
}
}
var weapons = user.weapons();
var 1 Hand Sword = 1;
condition = false;
for (var i = 0; i < weapons.length; ++i) {
var weapon = weapons;
if (weapon && weapon.wtypeId === 1 Hand Sword) {
condition = true;
break;
}
}
</Custom Passive Condition>