Calculation of "to Hit"-Model

Post Reply
TMaekler
Posts: 2
Joined: Sat Feb 04, 2017 7:28 pm

Calculation of "to Hit"-Model

Post by TMaekler »

Hi,

was wondering about the way the soldier stats affect the to Hit values. Let's start with an example:

70% Hit chance / 50% Crit
According to the description on Ufopedia the 70% Hit Range would lead to a 20% Miss, 20% Grease and 60% Hit chance.
The 50% Crit would divide the Hit and Grease chance and convert them into:
- 60% Hit to 30% Crit and 30% Hit
- 20% Grease to 10% Hit and 10% Grease
- the 20% Miss would be unaffected
Which would lead to a total of 20% Miss, 10% Grease, 40% Hit and 30% Crit.

So far so good. But how do soldier stats affect this values? If a soldier for example has 15 dodge and 5 defense at what point would those values come into effect and change the effects of the RNG?

a) directly added to the RNG: 15 dodge + 5 defense = RNG + 20
That would lead to 40% Miss, 10% Grease, 40% Hit and 10% Crit.

b) decreasing the Hit Chance: 70% to 50%.
That would lead to 40% Miss, 10% Grease, 30% Hit and 20% Crit.

So with the second model we would have more crit chance than in the first. But which is implemented in LW2?
fowlJ
Posts: 198
Joined: Thu Jan 21, 2016 1:45 pm

Re: Calculation of "to Hit"-Model

Post by fowlJ »

Defence applies to the initial hit chance, bringing it to 65% or 45 Hit / 20 Graze / 35 Miss.

Dodge then applies last in the same way that Critical Chance does, just in reverse - so it goes:

Crit applies: 23% Crit, 32% Hit, 10% Graze, 35% Miss

->

Dodge applies: 20% Crit, 30% Hit, 13% Graze, 37% Miss

(Math done loosely, but I think it's right - note that Dodge can reduce a Graze to a miss, even though Crit can't turn a miss into a Graze.)
TMaekler
Posts: 2
Joined: Sat Feb 04, 2017 7:28 pm

Re: Calculation of "to Hit"-Model

Post by TMaekler »

fowlJ wrote:Defence applies to the initial hit chance, bringing it to 65% or 45 Hit / 20 Graze / 35 Miss.
I thought Graze brings it to 55 Hit / 20 Graze / 25 Miss (the 10 Graze go + and - 10 around the 65).
fowlJ wrote: Dodge then applies last in the same way that Critical Chance does, just in reverse...
So dodge is calculated last after Crit has applied; not that Dodge and Crit are summed up before applying?!?

Thanx ;-)
fowlJ
Posts: 198
Joined: Thu Jan 21, 2016 1:45 pm

Re: Calculation of "to Hit"-Model

Post by fowlJ »

TMaekler wrote: I thought Graze brings it to 55 Hit / 20 Graze / 25 Miss (the 10 Graze go + and - 10 around the 65).
Whoops, that was a mistake on my part - that is correct.

And yes, dodge is applied separately after critical chance.
Post Reply