Let's see... slightly changed the code.
Now Inertia can go up to 35, and for every point over 10 it gets a 4% chance to wound (or get wounded) more severely (up to 100% max chance).
Cavalry units only get the chance to be wounded more for each point of Inertia over 10.
This should reward being able to Storm from further away and should make Anti-Cavalry stronger against horses...
https://www.sendspace.com/file/37wy3m
Repeating tests with the changed code:
Test 1:
Armies:
45 Pikemen (1170 Corn) vs 23 Knights (1150 Corn)
(both in a 15 columns formation)
Pikemen won
100 battles on a total of 100
Test 2:
Armies:
45 Sword Fighters (1665 Corn) vs 33 Knights (1650 Corn) (no storming)
(both in a 15 columns formation)
Sword Fighters won
12 battles on a total of 100
EDIT: With the Sword Fighters Storming at the start of each battle and the Knights not dodging it, the result is that Sword Fighters won
59 battles on a total of 100
In my opinion it looks better now... doesn't it?
That would still make sword fighters stronger, I think they don't need a boost either. :S For militia it would be nice.

Well, not really: Cavalry units can dodge a Storm Attack, ranged units are dead anyway if caught in melee battle, and Anti-Cavalry units are the ones who get the bonus against a storming opponent...
P.S. Taking note of the changed code:
KM_Units.pas
- Code:
procedure TKMUnit.UpdateInertia;
begin
//Now we check for the inertia bonus due to charging or storming
if ( not (GetUnitAction is TUnitActionFight) ) and (fUnitType in [low(UnitGroups) .. high(UnitGroups)]) then
begin
if (GetUnitAction is TUnitActionStormAttack)
or ( (GetUnitAction is TUnitActionWalkTo) and (UnitGroups[fUnitType] = gt_Mounted) ) then
begin
if fInertia < 35 then Inc(fInertia);
end
else if fInertia > 0 then Dec(fInertia);
end;
end;
KM_UnitActionFight.pas
- Code:
end else begin
IsHit := True;
if (fOpponent.UnitType in [low(UnitGroups) .. high(UnitGroups)]) and (UnitGroups[fOpponent.UnitType] = gt_AntiHorse) then
begin
if ((fUnit.Inertia-10)*4) < KaMRandom(101) then fUnit.HitPointsDecrease(1, fOpponent)
else fUnit.HitPointsDecrease(2, fOpponent);
end else begin
if (((fUnit.Inertia-10)*4) < KaMRandom(101)) or (UnitGroups[fUnit.UnitType] = gt_Mounted) then fOpponent.HitPointsDecrease(1, fUnit)
else fOpponent.HitPointsDecrease(2, fUnit);
end;
end;
[/size]
Just when you think you know something, you have to look at it in another way, even though it may seem silly or wrong. You must try! - John Keating, "Dead Poets Society"