I'm not sure if this is the right place to ask this, so please forgive me >_<
I'm currently working on a passive state called "Gift Of Inessa" the synopsis of the skill is as follows:
You and your allies heal for 12% of the direct damage you deal over 4 turns.
I'm having trouble with making the damage fall off after 4 turns. Currently, I've arranged the script like this (I'm using Yanfly's plugins):
I place this script in skills that deal direct damage to enemies
I place this script inside the state used to heal allies
My problem is that if I don't have something to drop damage off of Variable #1 four turns after the initial damage was dealt, the healing will stack indefinitely. Is there a remedy to this that I'm missing?
EDIT: Solved! For those who care to know, I basically had to create a "spoonfeeding" system if you will that involves 2 states.
The first state, one that's a passive state on my actor:
The second state, and the one that will be a passive aura on all allies:
The entire system takes each 18% value into Var #2, and then feeds 25% of it to Var #1. Then, after the actors are healed, it clears Var #1 to prepare it for another 25% spoonful of Var #2. It took me a good few hours of sitting on it to finally figure it out.😤
I'm currently working on a passive state called "Gift Of Inessa" the synopsis of the skill is as follows:
You and your allies heal for 12% of the direct damage you deal over 4 turns.
I'm having trouble with making the damage fall off after 4 turns. Currently, I've arranged the script like this (I'm using Yanfly's plugins):
I place this script in skills that deal direct damage to enemies
<Post-Damage Eval>
var x = Math.ceil(value * 0.12);
$gameVariables.setValue(1, ($gameVariables.value(1) + x));
</Post-Damage Eval>
var x = Math.ceil(value * 0.12);
$gameVariables.setValue(1, ($gameVariables.value(1) + x));
</Post-Damage Eval>
I place this script inside the state used to heal allies
<Regen Formula: Math.ceil($gameVariables.value(1) * 0.25)>
My problem is that if I don't have something to drop damage off of Variable #1 four turns after the initial damage was dealt, the healing will stack indefinitely. Is there a remedy to this that I'm missing?
EDIT: Solved! For those who care to know, I basically had to create a "spoonfeeding" system if you will that involves 2 states.
The first state, one that's a passive state on my actor:
<Custom Establish Effect>
var x = Math.ceil(value * 0.18);
$gameVariables.setValue(2, ($gameVariables.value(2) + x));
</Custom Establish Effect>
<Custom Regenerate Effect>
$gameVariables.setValue(1, 0);
</Custom Regenerate Effect>
<Custom Action End Effect>
$gameVariables.setValue(1, ($gameVariables.value(2) * 0.25));
$gameVariables.setValue(2, ($gameVariables.value(2) * 0.75));
</Custom Action End Effect>
var x = Math.ceil(value * 0.18);
$gameVariables.setValue(2, ($gameVariables.value(2) + x));
</Custom Establish Effect>
<Custom Regenerate Effect>
$gameVariables.setValue(1, 0);
</Custom Regenerate Effect>
<Custom Action End Effect>
$gameVariables.setValue(1, ($gameVariables.value(2) * 0.25));
$gameVariables.setValue(2, ($gameVariables.value(2) * 0.75));
</Custom Action End Effect>
The second state, and the one that will be a passive aura on all allies:
<Regen Formula: Math.ceil($gameVariables.value(1) + 1)>
The entire system takes each 18% value into Var #2, and then feeds 25% of it to Var #1. Then, after the actors are healed, it clears Var #1 to prepare it for another 25% spoonful of Var #2. It took me a good few hours of sitting on it to finally figure it out.😤