Weapon Type ID in Damage Formula?

First question ever so I apologize in advance if I posted this in the wrong spot. Anyhow....

I'm trying to replicate the Jump skill used in Final Fantasy series/Bravely Default.

I want the damage to be multiplied by 3x if the user has a spear type weapon equipped and only 2x for any other weapon type.

Spears are type ID 6 in my game. I can't figure out how to check the weapon type in the damage formula.

The ideal formula would look something like this:

if (user's weapon type is 6) {a.atk * 3} else {a.atk * 2}

The actual damage formula in my game is a lot longer so I'll post the whole thing if need be but I'm hoping someone can help me out. It seems like you can call literally any variable in the entire game except the weapon type ID.

Thanks in advance!
a.isWtypeEquipped(6) ? a.atk * 3 : a.atk * 2;
Problem solved! Thank you so much for your help, I can't believe how quickly you responded. Cheers!
Problem solved! Thank you so much for your help, I can't believe how quickly you responded. Cheers!
If you have time to think about your problem before I solve it, I'm not doing my job properly. 😉

Original thread: https://forums.rpgmakerweb.com/threads/weapon-type-id-in-damage-formula.151918/