----- Normal Attack -----
(Note: Attacker's defense values are not used; defender's attack values are not used.)
Cavalry%: Attack value of cavalry / total attack value of attacking army
Total defense: (Total infantry defense * [1-Cavalry%]) + (Total cavalry defense * Cavalry%)
Loser's casualties: 100%
Winner's casualties: (loser's strength / winner's strength)^1.5 * 100%
----- Raid -----
As Normal Attack, but "winner's casualties" is now "modifier"
Winner's casualties: modifier / (modifier + 1) * 100%
Loser's casualties: 100% - winner's casualties
----- Scouting -----
(Note: This is not the exact formula, but it provides a close approximation.)
Attacking scouts are considered to have 35 attack (subject to all the normal modifiers). Blacksmith upgrades give ~2.1% bonus per level instead of ~1.5% bonus per level.
Defending scouts are considered to have 20 attack (subject to all the normal modifiers). Armory upgrades give ~3.0% bonus per level instead of ~1.5% bonus per level.
Defender's casualties: 0%
Attacker's casualties: (defense strength / attack strength)^1.5 * 100%
If defense strength is higher than attack strength, then all attacking scouts die.