(Yanfly Plugins) Add element to DoT?

Yanfly link is here:


My formula is here:

Spoiler
<Custom Apply Effect>
target._damageBurn = Math.ceil(origin.mat * 0.50);
</Custom Apply Effect>

<Custom Remove Effect>
target._damageBurn = undefined;
</Custom Remove Effect>

<Custom Regenerate Effect>
target._damageBurn = target._damageBurn || Math.ceil(origin.mat * 0.50);
target.startAnimation(12);
target.gainHp(-target._damageBurn);
target.startDamagePopup();
if (target.isDead()) {
target.performCollapse();
}
target.clearResult();
</Custom Regenerate Effect>

My question is how would I go about making this a specific element? Like element id 4 (Fire), for example.
Code:
target.gainHp(-target._damageBurn * target.elementRate(X));
target.gainHp(-target._damageBurn * target.elementRate(X));

Would that change the element to fire or would that simply multiply the damage by the element rate? I was hoping to have it as the actual element for absorption purposes.


For example if an enemy casts burn on your party and they all absorb fire damage then it'll heal them instead of damage them.
Element rate is a %, so l can't guess how you design your absorb.
Yanfly has an Absorption plugin. I used to use a different plugin to simply turn the DoTs into a specific element (Thus allowing Yanfly's plugin to absorb), but with updates to Yanfly's plugins I didn't want there to be any compatibility issues, so I wanted to just use Yanfly instead of the other plugin.
Had to check the plugin because what you told me doesn't help.


I checked quickly how it make the absorb and it seems to multiply the element rate by *-1 so


target._ea = target._ea || 1;


if (target.isStateAffected(State of absorb if necessary)) {


target._ea = target.elementRate(X) * -1 }


target.gainHp(-target._damageBurn * target._ea);




I have no idea what make a actor absorb an element though so l can't play seer.
That worked great!  Works as a DoT without the Absorb state and like a heal with the Absorb state! Tyvm

Original thread: https://forums.rpgmakerweb.com/threads/yanfly-plugins-add-element-to-dot.71286/