(Yanfly Plugins) Creating Poison State based on origin stats.

So I an hoping to obtain information on two things.


The first thing is how do I dictate that I want the origin's stat to be taken into consideration for the damage?


The second thing is how do I force an element (eg: poison) for the damage dealt?


I'm sure this is wrong since it doesn't work, but this is what I have.


<Custom Regenerate Effect>


var value = Math.floor(1.2 x origin.mat * -1);


user.gainHp(value);


</Custom Regenerate Effect>


I used to use Elly's State Damage to accomplish this, but I recently discovered compatibility issues between it and Yanfly's plugins.

Original thread: https://forums.rpgmakerweb.com/threads/yanfly-plugins-creating-poison-state-based-on-origin-stats.65726/