Update:
I made a boo-boo. That was only the probability that the attacker wins without any damage. The real probability is what the chance of win is with ANY amount of damage, as such, here is the formula:
p(attacker wins)~b(h(D);rolls, p) where p = attackVal/defenseVal+attackVal, h(d) = hitpoints of defender and h(a) = hitpoints of attacker.
=(rolls!/hitpoints_of_defender!(rolls-h(D))!)*
((p)^h(D))*((1-p)^(rolls-h(D)))
where rolls is a function of h(D), h(A), and p such that:
Sum of series(Sigma, for those of you who have taken high school math) with min rolls = x as the lower parameter and max rolls as a higher parameter, and the equation p(x)*((x!/hitpoints_of_defender!(x-h(D))!)*
((p)^h(D))*((1-p)^(x-h(D)))).
This is the same as replacing rolls with the expected (mean) value of rolls. This we will call r. So...
r=Sigma(x=min Rolls, max Rolls, (x*p(x)))
min Rolls = lowest hp of the two units
max Rolls = (h(A)+h(D))-1
p(x)=p(of a roll)~b((x;(Max Rolls, p)
For those of you not learned in stats this means that if the defender is higher:
p(x)=((Max Rolls)!/x!((Max Rolls)-x)!))*(p^(x))*((1-p)^(Max Rolls-x))
Plug all the answers and variables in and you have your probability. BTW, the chance that modernarmor loses to an elite spearmen, as you have seen, is much lower then you all seem to think. Expected rolls is only about 5.312, and the chance to win is around 0.03. (3%)
I made a boo-boo. That was only the probability that the attacker wins without any damage. The real probability is what the chance of win is with ANY amount of damage, as such, here is the formula:
p(attacker wins)~b(h(D);rolls, p) where p = attackVal/defenseVal+attackVal, h(d) = hitpoints of defender and h(a) = hitpoints of attacker.
=(rolls!/hitpoints_of_defender!(rolls-h(D))!)*
((p)^h(D))*((1-p)^(rolls-h(D)))
where rolls is a function of h(D), h(A), and p such that:
Sum of series(Sigma, for those of you who have taken high school math) with min rolls = x as the lower parameter and max rolls as a higher parameter, and the equation p(x)*((x!/hitpoints_of_defender!(x-h(D))!)*
((p)^h(D))*((1-p)^(x-h(D)))).
This is the same as replacing rolls with the expected (mean) value of rolls. This we will call r. So...
r=Sigma(x=min Rolls, max Rolls, (x*p(x)))
min Rolls = lowest hp of the two units
max Rolls = (h(A)+h(D))-1
p(x)=p(of a roll)~b((x;(Max Rolls, p)
For those of you not learned in stats this means that if the defender is higher:
p(x)=((Max Rolls)!/x!((Max Rolls)-x)!))*(p^(x))*((1-p)^(Max Rolls-x))
Plug all the answers and variables in and you have your probability. BTW, the chance that modernarmor loses to an elite spearmen, as you have seen, is much lower then you all seem to think. Expected rolls is only about 5.312, and the chance to win is around 0.03. (3%)


As to those who experience a lot of unit being killed by some lone spearman, lets just say that you have bad luck (as in you get a series of bad roll). As I mentioned in some other thread, a 3% chance does not mean a sure 3 in 100 rolls. It can mean 30 in 1000, 300 in 10000 etc. So, if you have some bad luck and that 30 happen in a roll....but did you ever stop and think about those uncounted battle that you have won?? The more battle you fought, the higher chances that the killer spearman will appear! Due to the fact that most of my game are pretty peaceful (I am a Pasive guy
) the killer spearman hardly happen to me (It does happen, just to make everyone happy