FlyHunter 0 Posted March 2, 2021 Share Posted March 2, 2021 (edited) Hello guys. I have a question I hope somebody can help me about this. How does average damage bonus rolls work? I mean is the probability of rolling %60 average damage is equal to rolling %12 average damage? Or probability of rolling %27 is equal to probability of rolling %-10? When a average damage bonus is rolling, does every number have the same probability with others? Or rolling %10 is easier than %58? If not, can you share te formula? Thanks for your attention! Edited March 2, 2021 by FlyHunter Link to comment Share on other sites More sharing options...
Premium Shogun 4587 Posted March 3, 2021 Premium Share Posted March 3, 2021 It's simpler than that the percent is added to the damage of your normal, non skill hits. Link to comment Share on other sites More sharing options...
Premium Syreldar 1875 Posted March 3, 2021 Premium Share Posted March 3, 2021 (edited) Skill Damage gets calculated before Average Damage, the latter is based on the result of the first. This is the default formula: iSkillBonus = MINMAX(-30, (int) (gauss_random(0, 5) + 0.5f), 30); if (abs(iSkillBonus) <= 20) iNormalHitBonus = -2 * iSkillBonus + abs(number(-8, 8) + number(-8, 8)) + number(1, 4); else iNormalHitBonus = -2 * iSkillBonus + number(1, 5); de facto, Max Avg Dmg should be 65% and Max Skill Dmg is 30%, but since values lower than 20 Skill Damage cause the Avg Damage to take into account the second calculation, it's impossible to get more than 60 Avg Damage, Max Skill Damage is still 30. Obviously, the formula is heavily weighted towards minimum values, so getting 50% Avg. Damage is significantly harder than getting 10% Avg Damage, and obviously the same goes for Skill Damage. The "+0.5f" has the purpose to round the value to the nearest integer. Edited October 9, 2023 by Syreldar 2 1 "Nothing's free in this life. Ignorant people have an obligation to make up for their ignorance by paying those who help them. Either you got the brains or cash, if you lack both you're useless." Syreldar Link to comment Share on other sites More sharing options...
Gajos 0 Posted November 14, 2022 Share Posted November 14, 2022 On 3/3/2021 at 7:55 AM, Shogun said: It's simpler than that the percent is added to the damage of your normal, non skill hits. Bro, I have no idea how the MINMAX function look like.. why there are 3 parameters? Where can I find the missing code? Link to comment Share on other sites More sharing options...
Tekanse 534 Posted November 14, 2022 Share Posted November 14, 2022 (edited) 4 hours ago, Gajos said: Bro, I have no idea how the MINMAX function look like.. why there are 3 parameters? Where can I find the missing code? int MINMAX(int min, int value, int max) { register int tv; tv = (min > value ? min : value); return (max < tv) ? max : tv; } Edited November 14, 2022 by Tekanse Click here to check out my paid services. Link to comment Share on other sites More sharing options...
msmajda9 25 Posted April 7 Share Posted April 7 (edited) i full rewrite normal damage & skill damage in void CItemAddonManager::ApplyAddonTo Edited April 7 by msmajda9 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now