Warbarons calculates propabilites in floating point, but rolls integer dice. However, instead of rounding probely, the probabilites are apparently truncated to the lower value.
This manifests itself in various ways, for example:
- Heroes with UL10 such as a HorseLord will never die against Skeletons (Str 3) in Level 1 ruins (Dice 12), calculation follows below.
- 8 elves (12/2) attacking 4 minotaurs (25/2) in the open have on average a success chance of 65.8%, but vice versa, 4 minotaurs attacking 8 elves have a success chance of 38.2%. Note that 65.8%+38.2% = 104%, although the battle ought to be symmetric (no ambush, no defense or attack boni).
Instead of possible infinite die rolls, Warbarons calculates a single percentage for the next hit through this formula:
a * (1-d) / (a * (1-d) + (1-a) * d)
So in the case of Str10 versus Str3 at Ruin Dice 12 we have:
10/12 * (1-3/12) / (10/12 * (1-3/12) + (1-10/12) * 3/12) = 0.9375
Now we must scale back to the die used:
0.9375 * 12 = 11.25
And indeed, inspecting the die rolls show us 11.25 attached for the attacking hero and 0.75 for the poor defending Skeleton. The die delivers correctly a number between 1 and 12, with 1 being the worst outcome for our hero.
Unfortunately for the Skeleton: 1 > 0.75, so the Skeleton cannot win.
And here is the picture proof (scroll to the right and look at the top line saying "Battle roll: 1/12" and see who takes the hit:
The calculations for the Elves vs Minotaurs follows similarly, but given the large die, the effect is barely noticeable (well about 2% in favor of the attacker, but assymetrically distributed, but the 1000 simulations vary by more than that any way).
In fact, I would not want a fix, since I like it that there is a tiny advantage for the attacker.
However, I would suggest increasing the skeletons strength, so that skeletons are not a guaranteed win for heroes with UL 10 already.
Another simple fix possibility would be to cap the probability from below at 1, so that there is always a chance to take a hit, but then even heoroes with UL30 could die in L1 ruins (although extremly rare) which I would not like so much.