Bug #118
openSome NPCs have outrageously high (>1000) stats
0%
Description
It has been noted that some NPCs have outrageously high stats. The Maze Keeper, for instance, has stats that are greater than 1000.
I discovered that this can happen when SetLevel() is called before SetRace().
SetRace() calls genetics::eventInitializeStats(). This function is whack and has been for a long time! Some recent change that I made elsewhere seems to have allowed the crazy of this function to emerge.
It takes the base stat level for the given race and multiples it by 1/10th of the NPCs level. It then halves this value and then multipled by the NPCs level and divided by 3.5.
So, let's look at the Maze Keeper, a level 42 god. The base stat level for each stat is 43. So, given the information above, each stat would be:
43 * 42 / 10.0 / 2 * 43 / 3.5 == 1109