Hey, first off, sorry for another script question. I've been going through the internet but still haven't found a way that works for what I want. I get a "SyntaxError: Unexpected End of Output" when I try to play test. Could anyone look through my code, see where I went wrong?
<Custom Passive Condition>
if (user.isStateAfflicted (25) && user.hp / user.mhp <= 0.60 && user.hp / user.mhp > 0.40) {
condition = true;
} else {
if (user.hp / user.mhp <= 0.40 && user.hp / user.mhp > 0.25) {
condition = true;
} else {
condition = false;
}
</Custom Passive Condition>
This code is going in a passive state. The passive state is a type of "death spiral" in that, originally, the actor's stats decrease a bit when their max hp falls below 40% of their max. I'd also like to be able to "layer" the spiral, in that there are three states that pass into one another as the actor's health gets lower and lower (hence the part where it states "user.hp / user.mhp >= 0.25".
Now, the aforementioned is easily obtained by using the standard passive conditions of <Passive Condition: HP below 40%> and <Passive Condition: HP above 25%>. However, I want to give one of my classes a skill that boosts their Aggro Rate and evasion skills (evasion, crit evasion, magic evasion), as the class is an evasion tank. The drawback is that while the state is active, the spiral effects (called Weary, Fatigued, and Exhausted) activate at higher HP percentages (Weary from 60%-40%, Fatigued from 40%-25%, and Exhausted at below 25%).
I don't know where I went wrong with my code, but the way I see it is:
If the user has state 25 (my evasion tank's self-buff state), AND the user's current health is at or below 60% of maximum, AND the user's current health is above 40%, the condition is True. If not, and the user's current health is at or below 40% of maximum, AND the user's current health is above 25% of maximum, the condition is True. If not, the condition is False.
I really wish I was able to figure this out on my own because I want to learn JavaScript (so I'm not such a burden on you all 😛), but I can't figure this one out. Sorry! Any help is much appreciated!
<Custom Passive Condition>
if (user.isStateAfflicted (25) && user.hp / user.mhp <= 0.60 && user.hp / user.mhp > 0.40) {
condition = true;
} else {
if (user.hp / user.mhp <= 0.40 && user.hp / user.mhp > 0.25) {
condition = true;
} else {
condition = false;
}
</Custom Passive Condition>
This code is going in a passive state. The passive state is a type of "death spiral" in that, originally, the actor's stats decrease a bit when their max hp falls below 40% of their max. I'd also like to be able to "layer" the spiral, in that there are three states that pass into one another as the actor's health gets lower and lower (hence the part where it states "user.hp / user.mhp >= 0.25".
Now, the aforementioned is easily obtained by using the standard passive conditions of <Passive Condition: HP below 40%> and <Passive Condition: HP above 25%>. However, I want to give one of my classes a skill that boosts their Aggro Rate and evasion skills (evasion, crit evasion, magic evasion), as the class is an evasion tank. The drawback is that while the state is active, the spiral effects (called Weary, Fatigued, and Exhausted) activate at higher HP percentages (Weary from 60%-40%, Fatigued from 40%-25%, and Exhausted at below 25%).
I don't know where I went wrong with my code, but the way I see it is:
If the user has state 25 (my evasion tank's self-buff state), AND the user's current health is at or below 60% of maximum, AND the user's current health is above 40%, the condition is True. If not, and the user's current health is at or below 40% of maximum, AND the user's current health is above 25% of maximum, the condition is True. If not, the condition is False.
I really wish I was able to figure this out on my own because I want to learn JavaScript (so I'm not such a burden on you all 😛), but I can't figure this one out. Sorry! Any help is much appreciated!