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.
This is the Javascript code
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?
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))
Code:
((HPMax - HP)/HPMax) * 5 * player level)
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: