Hello, I'm trying to set up the stats of a piece of armor, so that its effects are lost if the wearer doesn't have a state that can be lost in combat. I thought I had the custom stats right, but in battle test the max HP boost I added just to check if everything worked never shows up when the state in question is lost.
Here's my custom stats:
State 5 is a passive state given by the armor, I can confirm that it's lost during my tests, the problem is that the max HP increase doesn't kick off when the loss happens.
I tested the whole thing while preceding the first and last lines are comments, and it worked. So I definitely messed up the condition.
Can somebody tell me what's wrong? Thanks in advance!
EDIT: I removed the space after if, now the HP boost is always there even when the wearer has State 5.
EDIT, THE SEQUEL: I changed the if statement to be the same as the condition that turns off the passive state, now everything works as intended. The conclusion is, don't use passive states in your custom stat conditions.
Here's my custom stats:
Code:
<Custom Parameters>
if(user.isStateAffected(5) !== true) {
atk = -5;
def = -10;
mat = -10;
mdf = -10;
agi = 10;
maxhp = 100;
}
</Custom Parameters>
I tested the whole thing while preceding the first and last lines are comments, and it worked. So I definitely messed up the condition.
Can somebody tell me what's wrong? Thanks in advance!
EDIT: I removed the space after if, now the HP boost is always there even when the wearer has State 5.
EDIT, THE SEQUEL: I changed the if statement to be the same as the condition that turns off the passive state, now everything works as intended. The conclusion is, don't use passive states in your custom stat conditions.