I saw a post on the forums about an experiment:
- with equal Defense and Attack;
- with equal Attack and Defense skill levels;
- with an equal number and quality of creatures - the one with higher Defense wins.
A hero with a group of creatures and an Attack Expertise (+30%) skill attacks an opponent with a Defense Expertise (-15%) skill. The base damage is 100. As a result of the Attack Expertise, the damage is 100 * 1.3 = 130. Now, this damage is reduced by 15% due to the Defense Expertise. We get 130 * (1 - 0.15) = 110.5. A hero with Defense Expertise, when attacking a hero with Defense Expertise, will inflict only the base damage of 100.
Conclusion: in melee combat, the hero with the Attack skill deals 10.5% (110.5 - 100) more damage to their opponent with Defense.
However, the Attack skill only increases damage for melee units (archers have their own skill - Archery), while Defense affects both melee and ranged units. Therefore, if there are many archers in the army, which is usually the case, I think it's better to take the Defense skill. But if I'm planning on having only melee units, then I'll probably choose Attack.
Perhaps this experiment involved archers, because when comparing two equal melee armies, the army with the hero with the Attack skill should win, logically.