clintbellanger/flare-engine — pull request #349 by makrohn (2013-02-10 15:43:20+00:00)
Title: Fix Avatar transform stat maxes

Closes https://github.com/makrohn/polymorphable/issues/31

I think that clampCeil was erroneously used where it ought to have been clampFloor. If I understand https://github.com/clintbellanger/flare-engine/blob/master/src/UtilsMath.h#L32 correctly, clampFloor is looking to make sure that the higher of two values is used - in this case, dmg_*_min or dmg_*_max. By using clampCeil on the dmg_*_max, it was setting dmg_*_max to the lower of two values - which was causing some really weird damage behavior when transformed (with damage values of say, 4-2).

The same issue affected absorb min and max.

Here's the commit where the error appears to have been introduced. I believe that I am restoring the original desired behavior.
https://github.com/clintbellanger/flare-engine/commit/5e9c0f47e8b80b36f15bc60cee47b7c717e7789f#L0L836

Tested in Polymorphable, just because it's easier to see there with static damage numbers.