Element Rate call

I created a state which procs when a weapon with the state hits a target, by putting this in the notes:

<Custom Apply Effect>
target.startDamagePopup()
target.gainHp(-20);
target.startAnimation(43);
if (target.isDead()) {
target.performCollapse();
}
</Custom Apply Effect>


I would like the -20HP to take elemental resists into its equation. Does anyone know the call for this?

I am thinking it might looks something like: (-20 * target.elementRate(element06))

Using this though, I get an error message of "element06 is not defined"

Holler if you know what I need to type here.


Thank you,

GEA

Original thread: https://forums.rpgmakerweb.com/threads/element-rate-call.84172/