I'm currently creating a skill that will either deal damage as a normal attack, or if the enemy has a specific state, it will instead inflict sleep.
I've browsed through several threads and other resources regarding the damage formula box, and none of the state-checking seems to be working properly.
The formula I'm using is
if b.state?(26) == true; b.add_state(6);0; else; a.atk * 4 - b.def * 2; end;where 26 is a custom state called "Is Human", which will be put on Bandits and the like, and 6 is Sleep.
Currently, through all of the "Battle Test" that I've done, the formula seems to be ignoring everything except the damage calculation.
I can see that the state 26 is applied to the enemy through means of the "Message when state remains" field on the state editor, so I'm not sure where the problem is.
If anyone could provide any insight as to how to make this work, please let me know.
I've browsed through several threads and other resources regarding the damage formula box, and none of the state-checking seems to be working properly.
The formula I'm using is
if b.state?(26) == true; b.add_state(6);0; else; a.atk * 4 - b.def * 2; end;where 26 is a custom state called "Is Human", which will be put on Bandits and the like, and 6 is Sleep.
Currently, through all of the "Battle Test" that I've done, the formula seems to be ignoring everything except the damage calculation.
I can see that the state 26 is applied to the enemy through means of the "Message when state remains" field on the state editor, so I'm not sure where the problem is.
If anyone could provide any insight as to how to make this work, please let me know.