- Joined
- Dec 24, 2018
- Messages
- 88
- Reaction score
- 15
- First Language
- Italian
- Primarily Uses
- RMMV
Hello!
I'm making a State that regenerates an Actor's health every turn based on the Luk parameter of the actor that afflicted it to him. To do this i'm using a few of Yanfly's plugins, such as the BuffStatesCore.
This is the code written for the State:
In theory, this code should take the Luk parameter of the actor that applied the skill, and use it as a base for the Health Regeneration effect. Apparently it doesn't work that way, and instead uses the Luk parameter of the actor that receives the State. I remember that "origin" served the exact purpose that i need, but perhaps it works differently?
EDIT: I should add, the skill that applies this State works outside of battle as well. Maybe it has something to do with that?
I'm making a State that regenerates an Actor's health every turn based on the Luk parameter of the actor that afflicted it to him. To do this i'm using a few of Yanfly's plugins, such as the BuffStatesCore.
This is the code written for the State:
Code:
<Custom Apply Effect>
// Calculate the damage to be dealt by the formula.
target._Guidato = Math.floor((origin.param(7) - 10) / 2);
</Custom Apply Effect>
<Custom Remove Effect>
// Remove the damage effect.
target._Guidato = undefined;
</Custom Remove Effect>
<Custom Regenerate Effect>
// Default the DoT formula.
target._Guidato = target._Guidato || Math.floor((origin.param(7) - 10) / 2);
// Increases the target's HP
target.gainHp(target._Guidato);
// Start the damage popup.
target.startDamagePopup();
// Clear the target's results.
target.clearResult();
</Custom Regenerate Effect>
EDIT: I should add, the skill that applies this State works outside of battle as well. Maybe it has something to do with that?
Last edited:
