Changing a skill's attack element based on 1 particular weapon

Hello,
I have a peculiar problem: one of my chars has 4 different weapons each with a different element of attack (they are physical, absorb, earth, and water), and I know that many skills use "Normal Attack" to change the skill's respective element based on what the weapon says.
I want this property for only 1 weapon, the absorb one. In every other case the skill is supposed to deal physical damage. Is there a way to do this without making a copy of the skill?
Set the skill element to "None" and use the skill formula to handle damage reduction if the weapon is equipped.
Code:
r = formula_here; a.equips.include?(your_weapon) ? r * b.elem_rate(absorb_element_here) : r * b.elem_rate(physical_elem)

NOTICE: I wrote this from mobile, the syntax might contain errors, check it out before using it.
Sadly that does not work (no damage is dealt no matter the equip), but thank you anyway.
Try to change elem_rate to element_rate
Code:
r = a.mat*4; a.equips.include?(36) ? r * b.element_rate(2) : r * b.element_rate(7)
I think the issue is that the formula doesn't define "weapon 36". My guess thus is that the formula fails because it can't find whatever would be #36, therefore defaults to the physical damage and then fails because the test enemy is immune to that particular damage type. If I remove the immunity then it deals damage, so it probably means that that damage type is always used.
Code:
r = a.mat*4; a.equips.include?($data_weapons[36]) ? r * b.element_rate(2) : r * b.element_rate(7)
Code:
r = a.mat*4; a.equips.include?($data_weapons[36]) ? r * b.element_rate(2) : r * b.element_rate(7)
It works now, thank you very much.

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/changing-a-skills-attack-element-based-on-1-particular-weapon.115688/