Correctly apply mod precision in item editor and fix assassian's mark scaling.
Fixes https://github.com/PathOfBuildingCommunity/PathOfBuilding/issues/4997 https://github.com/PathOfBuildingCommunity/PathOfBuilding/issues/5032
Includes https://github.com/PathOfBuildingCommunity/PathOfBuilding/pull/5034 to avoid merge conflicts
Description of the problem being solved:
When catalysts scaled mods became an integer they switch to being scaled like an int or regular mods that were an int range but should behave as decimals didn't and some mods used a default increment of 1 when they should be 2.
This was solved by running mod parser on the mods and seeing if they match our high precision mods then scaling with certain number of decimals or ensuring they can display a certain number of decimals e.g. regen range without catalyst scaling will now have 1dp instead of 0.
The default precision is now 1 this was previously a mixiture of 1 and 2. The only mod as far as I am aware that this applies to which it should apply to is 1 dp. Raised Zombies take 22.4% of their Maximum Life per second as Fire Damage
I am not 100% sure what the + 0.5 is trying to do.
local numVal = m_floor((tonumber(min) + range * (tonumber(max) - tonumber(min))) * power + 0.5) / power
This also improves functionallity to allow ranges between negative numbers and fixes negative values of reduced and less not being converted to increased/more.
Steps taken to verify a working solution:
- Test mods at ints and see they scale correctly.