For each stack in each round of battle a random number between 0.8 and 1.2 is generated. The chance is greater that that number is closer to 1.0 than to the extremes. The following plot shows how this weighting is done. It's a normal distribution with mean = 1.0 and standard deviation = 0.1. For a given stack in a given round the damage potentials against all class types are multiplied by this random number. For example, if the value is say 0.85 then the unarmed and light armored damage potentials are both multiplied by 0.85 for that stack in that round.

There are a few things I'm not sure about.

1. What standard deviation does the game server actually use? I would imagine it isn't greatly different than what I'm using here, but it could be smaller for example. If it was smaller then the change in damage potential wouldn't be as great on average.

2. At what points are new random values generated? I think how I am currently doing this seems reasonable but there are very many possible alternatives/permutations. For example, instead multiplying all the damage classes by the same random value one could generate a new random value for each damage class in each stack. This could be broken down even further so that you select a random value for each damage class of each unit in each stack, etc. It would be nice to know exactly how this is implemented.