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?
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?