03-06-2003, 02:01 AM
I had not participated in the thread that I had linked to in my earlier post prior to this. But I will be doing so soon. I had viewed what they were discussing with some interest as it had been more detailed than the typical "Wow, i had may high level iron golem killed in one blow in a game... What happened????" that I would typically find on other forums. In the Amazon Basin thread though it seemed as though there was some detail that every one was forgetting, including myself. It was...
By starting from here and doing some testing of various conditions, the problem is when
base_life*(100+Life_Bonus)>=2^23 (=8388608)
Where base_life is the base life of the monster/minion adjusted for the player count in the game. And where the Life_Bonus is the total of all the sources (Golem Mastery, Battle Orders, Oak Sage, Valkyrie inherent skill bonus, etc.). The Life_Bonus value is not a fraction, but the full integer value that would be used before the total was divided by 100 to get the "correct" new life value.
This is causing the the most significant bit to be 'set' and since this is a signed integer variable, 'setting ' this bit makes the life value negative befre the division by 100. Once the minion is hit a check against the current life (negative) will cause the minion to die.
Quote:Jarulf:This was the missing point.
Many calcs (like taking a percentage) will work by multiplying by 100 and then dividing.
By starting from here and doing some testing of various conditions, the problem is when
base_life*(100+Life_Bonus)>=2^23 (=8388608)
Where base_life is the base life of the monster/minion adjusted for the player count in the game. And where the Life_Bonus is the total of all the sources (Golem Mastery, Battle Orders, Oak Sage, Valkyrie inherent skill bonus, etc.). The Life_Bonus value is not a fraction, but the full integer value that would be used before the total was divided by 100 to get the "correct" new life value.
This is causing the the most significant bit to be 'set' and since this is a signed integer variable, 'setting ' this bit makes the life value negative befre the division by 100. Once the minion is hit a check against the current life (negative) will cause the minion to die.