Okay so here is the problem (I think): I have a custom passive state set up to affect all battlers, enemies and actors, and I'm having an issue with the <Custom Remove Effect> working properly. What I believe is the issue is that the auto passive state has a requirement to be active (user's MP > 1%), and when the auto passive state is deactivated it is not technically removed, so custom remove effects and custom leave effects don't work.
So I am wondering if there is some way to make something happen when the auto passive state is no longer active? I want there to be damage that happens when the condition is no longer met. Maybe I'm just not thinking about this in the right way?
Here is my note tag for the auto passive state:
Here is the bit that is not working:
Here are links to Yanfly auto passive states and Yanfly buffs & states core.
I have this state set as a global passive, not sure if that makes a difference or not though. Any help is appreciated.
So I am wondering if there is some way to make something happen when the auto passive state is no longer active? I want there to be damage that happens when the condition is no longer met. Maybe I'm just not thinking about this in the right way?
Here is my note tag for the auto passive state:
Code:
<Passive Condition: MP Above 1%>
<Custom React Effect>
if (value > 0 && this.isHpEffect()) {
var mpDmg = Math.floor(value * 0.85);
mpDmg = Math.min(mpDmg, target.mp);
target.gainMp(-mpDmg);
value -= mpDmg;
}
</Custom React Effect>
<Custom Regenerate Effect>
// Formula used to heal HP
var heal = target.mdf * 0.50;
// Play heal animation
target.startAnimation(59);
// Target gains MP
target.gainMp(heal);
// Play the popup
target.startDamagePopup();
// Clear the results
target.clearResult();
</Custom Regenerate Effect>
Here is the bit that is not working:
Code:
<Custom Remove Effect>
target.startAnimation(107);
var end = target.mmp * 0.25;
target.gainHp(-end);
target.startDamagePopup();
target.clearResult();
</Custom Remove Effect>
Here are links to Yanfly auto passive states and Yanfly buffs & states core.
I have this state set as a global passive, not sure if that makes a difference or not though. Any help is appreciated.