[0.9.159-PUBLIC#7003] False Alarm

Theron

Well-Known Member
Nov 8, 2018
4,401
1,651
46
False Alarm
Just tested it in-game, and it seems to work correctly.
I'd delete the thread, but I don't think it's possible.
It could probably use a clearer description of what it does, though.

Code:
(c += Math.round((t.HPMax() - t.HP()) / t.HPMax() * 5 * t.level))
This is the Javascript code
Code:
((HPMax - HP)/HPMax) * 5 * player level)
This was the Flash code. Note the different parenthesis placement.
The Javascript version gives a flat, very small bonus to Defense regardless of HP instead of scaling.

Unless the order of operations makes the two equivalent without needing an extra set of parentheses?
 
Last edited: