Hi everyone,
been trying to create an automated system where each battler recovers 25% of their MDef as Hp and Mp each turn.
I'm using the http://yanfly.moe/2015/12/04/yep-37-status-menu-core/ (Status menu core) and http://yanfly.moe/2015/10/17/yep-13-auto-passive-states/ (Auto Passive States).
I'm pretty sure it has something to do with rounding the variables, but as I know very little about javascript I'm not sure how to fix it. This is my current simple state (based off Yanfly's code for http://yanfly.moe/2016/03/26/tips-tricks-warmogs-armor/ )
<Custom Regenerate Effect>
var value = Math.ceil(user.mdef*0.25);
user.gainHp(value);
user.gainMp(value);
</Custom Regenerate Effect>
And this is the error I'm getting
Thanks!
been trying to create an automated system where each battler recovers 25% of their MDef as Hp and Mp each turn.
I'm using the http://yanfly.moe/2015/12/04/yep-37-status-menu-core/ (Status menu core) and http://yanfly.moe/2015/10/17/yep-13-auto-passive-states/ (Auto Passive States).
I'm pretty sure it has something to do with rounding the variables, but as I know very little about javascript I'm not sure how to fix it. This is my current simple state (based off Yanfly's code for http://yanfly.moe/2016/03/26/tips-tricks-warmogs-armor/ )
<Custom Regenerate Effect>
var value = Math.ceil(user.mdef*0.25);
user.gainHp(value);
user.gainMp(value);
</Custom Regenerate Effect>
And this is the error I'm getting
Thanks!