Battle
From The Five Pillars
In a battle killed units is calculated with the formula:
Potential damage: # of units * AP * (accuracy/100)
Actual damage: potential damage * (1-[dodge/100]) * (1 - [resistance/100])
Killed units: actual damage / HP
or
(# of killed units) = (# of units) * (AP) * (acc/100) * (1-[dodge/100]) *(1-[res/100]) / HP
Battle Order
you go to attack Enemy(#1)
You select which units you want to go into battle, and battle "commands"(normal,flank, charge, stand, aim...etc)
You can also choose to use a spell and/or an item
then you press ATTACK!!!!
Ok, first thing that happens is the game looks and figures out if any of the stacks are so puny that they will choose not to participate.
Secondly, battle wonders take effect.
Third, heroes do their mojo and use the abilities that they can use.
Fourth, shazaam uniques
Fifth, battle enchantments
Sixth, Randomized use of "assignments", here there is a 50/50 chance that you will use your Item THEN your spell before the enemy. The order of item BEFORE spell is especially important to assignment use. It is actually what caused the move for assignment use order to be randomized (before defender always used assign last)
Seventh, ok by now your units are either super boosted due to your uber good stuff, or hecka weak because of that unique or uncommon item that the enemy used to pawn you. So now the game evaluates each units adjusted initiatives. The units with the highest initiative will attack first. So say your Mind Flayers have a secondary initiative of five because you used astralysis/manual of specialties. This means your Mind Flayers will use their Ranged Paralyze attack against its target, however it will not use its primary attack yet, cause its primary attack still has an initiative of three.
Now if there are two units with an initiative of four, the chance that one will attack ebfore the other is randomized. And the battle continues on this way until all units have used their attacks with an initiative greater then zero.

