MZ Type of weapon equipped in damage formula?

Is this possible? Something like:

a.WeaponType(2); atk*2:atk;
it might be possible, but you could make a miniPlugin.
I believe soulrender uses a function to alternate it.

than you can use that function inside the dmg formula,
as you can add complex calculations directly to the it by calling
that function alone.

it is made for MV, but I think it is compatible with MZ as well.
I use this for a specific weapon type to do more damage than other weapons types, and it seems to work with no issues. Maybe it'll help with what you're trying to achieve?

if (user.equips()[0].wtypeId == 2) (a.atk * 2.0 - b.def * 0.3); else (a.atk * 1.0 - b.def * 0.3)
@RCDunn - I'd replace user with a for the damage formula. I guess you're using that in some notetag from a plugin, though. Note that it only checks the first equip slot, i.e. it ignores a dual-wielder's off-hand weapon.

There's actually a shortcut available to check this:

a.isWtypeEquipped(2) ? a.atk * 2 : a.atk
I.e. "if the user has at least one weapon of type 2 equipped, do 2 * ATK damage; else do ATK damage".

Original thread: https://forums.rpgmakerweb.com/threads/type-of-weapon-equipped-in-damage-formula.151911/