Hello, I'm using RPG Maker MV.
Here's the link to the plugin.
http://yanfly.moe/2015/12/25/yep-50-buffs-states-core/
I am using lunatic mode to add a number of states that is going to change the value of damage done.
One of which uses the notetag:
Damage is halved, but there's a mana return on attack. (numbers may change for balancing later).
<Custom Confirm Effect>
value*=0.5;
user.gainMp(Math.floor(value));
</Custom Confirm Effect>
My problem is that I am getting damage values that include decimal points. I need to round the number that does damage and I am not sure how to use Math.floor() here.
Math.floor(value*=0.5) seems to change nothing
value*=Math.floor(0.5) changes the 0.5 to 0 and cause no damage to be dealt.
Any thoughts on how to implement Math.floor() into the damage portion of this code?
Thanks in advance for nay help.
Here's the link to the plugin.
http://yanfly.moe/2015/12/25/yep-50-buffs-states-core/
I am using lunatic mode to add a number of states that is going to change the value of damage done.
One of which uses the notetag:
Damage is halved, but there's a mana return on attack. (numbers may change for balancing later).
<Custom Confirm Effect>
value*=0.5;
user.gainMp(Math.floor(value));
</Custom Confirm Effect>
My problem is that I am getting damage values that include decimal points. I need to round the number that does damage and I am not sure how to use Math.floor() here.
Math.floor(value*=0.5) seems to change nothing
value*=Math.floor(0.5) changes the 0.5 to 0 and cause no damage to be dealt.
Any thoughts on how to implement Math.floor() into the damage portion of this code?
Thanks in advance for nay help.