Sign in to follow this  
SilverySoul

Acc, Eva and how hit change is calculated

Recommended Posts

Have I miss understood something or is the document outdated info about how accuracy, evasion and hit chance is calculated?
This is what DefaultGameplayRule script says: (line 101 ->)

float hitChance = 2f;

if (attackerAcc != 0 && dmgReceiverEva != 0)
   hitChance *= (attackerAcc / (attackerAcc + dmgReceiverEva));
            
if (attackerLvl != 0 && dmgReceiverLvl != 0)
   hitChance *= ((float)attackerLvl / (float)(attackerLvl + dmgReceiverLvl));

Document says:
Hit chance = 2 * (10 / (10 + 30)) = 0.5

Default game play rules is modifying hit change with acc vs eva and level difference, so the documentation should say something like:

Hit chance = 2 *(attackerAcc / (attackerAcc + dmgReceiverEva)) *(attackerLvl / (attackerLvl + dmgReceiverLvl))
Example:
attackerAcc = 10
dmgReceiverEva = 30
attackerLvl = 10
dmgReceiverLvl = 10

Hit chance: 2 * (10 / (10 + 30) * (10 / (10 + 10) = 0.25

Then second character will receives damage if random result from 0 to 1 <= 0.25

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this