Here's the full explanation:
https://www.warzone.com/wiki/Luck_ModifierIn short, there are two main factors:
-kill rates, the default is 60% offensive and 70% defensive and it's how all games are played unless you really want to create something weird;
-rounding mode: weighted random and straight round
What this all means is that if 3 armies attack, they should kill 1.8 opponents armies by default (attacking_number*kill_rate).
If it's straight round, it will always round to the nearest number, so it will kill 2 armies.
If it's weighted random, it will have 80% chance to kill 2 armies and 20% chance to kill only 1.
Then there's the luck modifier that can go from 0 to 100%. It's purpose is to make things less predictable as the number goes up. I suggest to always leave it at 0%. And use cyclic move order while we're at it.