MV Heal Formula Help Please

Hello,

I'm trying to fix a formula I have that is using the Yanfly Engine (specifically the damage core and state categories.)

Formula:

〈damage formula〉
value = Math.round(target.mhp/10);
if user.isStateCategoryAffected('Shift') {
value += Math.round(target.mhp/10);
} else {
value += 0;
};
〈/damage formula〉

What should happen is that it heals or double heals depending on whether a state of the category is applied to the user, but it just does 0. Without the conditional branch the base value change works. I've even tried to change the if statement with '=== true', but to no avail. Anyone think they can help?
Moved to: Plugin Support
Hi!

I think you are missing the paranthesis after the if statement:

JavaScript:
value = Math.round(target.mhp/10);
if (user.isStateCategoryAffected('Shift') ) {
    value += Math.round(target.mhp/10);
} else {
    value += 0;
};
Hi!

I think you are missing the paranthesis after the if statement:

JavaScript:
value = Math.round(target.mhp/10);
if (user.isStateCategoryAffected('Shift') ) {
    value += Math.round(target.mhp/10);
} else {
    value += 0;
};
Thank you, I can't believe I forgot that. I have been spending hours trying to figure that out. Now to go over everything else to make sure I didn't make that mistake somewhere else. ^-^

Original thread: https://forums.rpgmakerweb.com/threads/heal-formula-help-please.142469/