Okay so what I've been trying to do is basically apply a state called "Winded" when a characters resource called "Stamina" is low, like say <40%. Then I want that state to remain applied until the characters stamina has regenerated back to say over 80% to simulate a character having to catch their breath after using too much energy.
I've been trying to do this with the VisuStella Skills and States plugin using the passive state functionality
<JS Passive Condition>
condition = user.mp/user.mmp <= 0.4;
</JS Passive Condition>
This works fine for the first part, but I can't figure out how to have the state remain until more conditions are met, the characters stamina regenerates turn by turn so it goes away immediately (once it goes above the 40% condition), so I tried something like:
<JS Passive Condition>
if
a.states().includes($dataStates[90]) && (user.mp/user.mmp <= 0.8
{
condition = true;
}
else if
(user.mp/user.mmp <= 0.4) {
condition = true;
}
else {
condition = false;
}
</JS Passive Condition>
Which was supposed to be if the state is already applied and the characters stamina is below 80% then it remains applied, but I'm not very well versed in Java and I just get errors on my variations of the above. I'd really appreciate some help if any one has any ideas on how to achieve this, whether with this plugin or some other way I'm not familiar with.
Thanks!
I've been trying to do this with the VisuStella Skills and States plugin using the passive state functionality
<JS Passive Condition>
condition = user.mp/user.mmp <= 0.4;
</JS Passive Condition>
This works fine for the first part, but I can't figure out how to have the state remain until more conditions are met, the characters stamina regenerates turn by turn so it goes away immediately (once it goes above the 40% condition), so I tried something like:
<JS Passive Condition>
if
a.states().includes($dataStates[90]) && (user.mp/user.mmp <= 0.8
{
condition = true;
}
else if
(user.mp/user.mmp <= 0.4) {
condition = true;
}
else {
condition = false;
}
</JS Passive Condition>
Which was supposed to be if the state is already applied and the characters stamina is below 80% then it remains applied, but I'm not very well versed in Java and I just get errors on my variations of the above. I'd really appreciate some help if any one has any ideas on how to achieve this, whether with this plugin or some other way I'm not familiar with.
Thanks!