Are you French? I play the game in English and am therefore a little uncertain about the words "profane" and "liche", but I assume they are the the words for "occult" and "necromancer" in English.
Anyway, I don't know exactly either how the losses are calculated, but what I've understood is that in an attack the offensive and defensive units are weighed equally against each other. So, looking at your example, I'm guessing this is the way: (I apologize, but this will be a little long.)
Your attack points:
1. Dragon: 5 x 1680 = 8400
2. Necromancer (liche?): 10 x 900 = 9000
3. Knight: 20 x 240 = 4800
4. Paladin: 50 x 60 = 3000
5. Pikeman: 100 x 40 = 4000
TOTAL: 29200
When your total attack points are 29200, that means the Dragons are 28,8% of that (8400/29200); the Necromancers 30,8% (9000/29200); Knights 16,4% (4800/29200); and Paladins and Pikemen 24% (7000/29200).
The same proportions of the defending units focus on each of the groups:
1.
28,8% of the Nomads, Dwarf and Archers therefore attack your Dragons.
That means 6 Nomads, 14 Dwarfs and 29 Archers attack Dragons:
6 Nomads x 130 (bestiary unit defence points) = 780
14 Dwarfs x 16 = 224
29 Archers x 18 = 522
TOTAL: 1526
With only 1526 defence points against dragons (which have 1680 attack points), zero of your dragons will die. Then we do the same calculation again with the other unit groups.
2.
30,8% of the Nomads, Dwarf and Archers attack your Necromancers.
That means 6 Nomads, 15 Dwarfs and 31 Archers attack Necromancers:
6 Nomads x 170 (occult unit (profane?) defence points) = 1020
15 Dwarfs x 16 = 240
31 Archers x 18 = 558
TOTAL: 1818
With 1818 defence points against necromancers (which have 900 attack points), two of your necromancers will die.
3.
16.4% of the Nomads, Dwarf and Archers attack your Knights.
That means 3 Nomads, 8 Dwarfs and 16 Archers attack Knights:
3 Nomads x 170 (cavalry unit defence points) = 510
8 Dwarfs x 26 = 208
16 Archers x 20 = 320
TOTAL: 1038
With 1038 defence points against knights (which have 240 attack points), four of your knights will die.
4.
24% of the Nomads, Dwarf and Archers attack your Paladins and Pikemen.
That means 5 Nomads, 12 Dwarfs and 24 Archers attack Paladins and Pikemen:
5 Nomads x 130 (infantry unit defence points) = 650
12 Dwarfs x 30 = 360
24 Archers x 20 = 480
TOTAL: 1490
With 1490 defence points against paladins and pikemen (which have 60 and 40 attack points), 10 of your paladins and 21 of your pikemen will die. (3000/7000 attack points were from Paladins and 4000/7000 were from Pikemen. That's why 3/7 of the 1490 defence points were against Paladins and 4/7 of the 1490 defence points were against Pikemen.)
Hopefully this wasn't too complicated. This is how I've understood it, and when I tested this calculation in a few of my attacks, it worked out pretty accurately. What's interesting about this system is that these attacks put a heavy burden on the more powerful units. Let's take an example:
Imagine that you're attacking with five dragons and 10 pikemen. The dragons represent 95% of the whole attack while the pikemen are only 5% of the attack. Now if the defence consists of 10 nomads, that means that 9 full units of them (95%) will attack the dragons. 9x130 is 1170 and will not manage to kill one single dragon. However, at the same time zero nomads will attack the pikemen (5% of 10 nomads is less than one), which means that none of the pikemen will die either. One would think that when one attacks with weaker units like pikemen against nomads, one would lose many of them, but that's not the case. One can notice this when attacking battlefields. When one has a lot of different units, the weaker ones do surprisingly well and do not die that much, because most of the defensive units in the battlefield focus on one's stronger attacking units. Here's an image of one of my attacks:
It shows clearly that the stronger units suffer the most, even though one would think that the weaker units (paladins and pikemen) would be destroyed the most. Seven dragons dead but only one unit each of paladins and pikemen died! But that's the way it goes. The bestiary units have so many attack points that a large part of the defensive units go head to head against them and leave the infantry units alone.
[EDIT: I initially wrote this post when very tired, so I made many mistakes in the calculations. I have now corrected them.]