###  Author

#### iancudorinmarian • PvP Event Organizer
•     •      •     • • Posts: 3715
• Country: • Reputation Power: 64
•            • Master of Ponies.Eternally salty about War#11 SEC.
• Awards:                      ##### Re: Heroes of Might and Magic IIIhttp://elementscommunity.org/forum/index.php?topic=66892.msg1292721#msg1292721
« Reply #24 on: July 07, 2019, 07:14:25 pm »
If you want to know the math behind damage calculation: heroes.thelazy.net/wiki/Damage

Simple version:

if atk > def, damage = stack_size * rand(min_dmg, max_dmg) * (1 + 0.05 * (atk - def))
if def < atk, damage = stack_size * rand(min_dmg, max_dmg) / (1 + 0.05 * (def - atk))

stack_size is the number of creatures in the attacking creature's stack
rand(x, y) is a random integer >= x and <=y

I am mostly interested in troop sizes required to take down another troop. For example, can I calculate how many Gargoyles I need to take down 76 Elite Griffins?
Total griffin hp = 25 * 76 = 1900
atk (gargoyle) = 6
def (griffin) = 9

def > atk, so we use the second formula (to have 100% chance to kill all griffins in one hit, we're using the minimum damage for gargoyle, which is 2)
stack_size * 2 / (1 + 0.05 * (9 - 6)) = stack_size * 2 / 1.15 ~= stack_size * 1.74

So we need stack_size * 1.74 = 1900, which means stack_size = 1900/1.74 ~= 1092.

So you need 1092 gargoyles to one-shot all griffins 100% of the time. I told you you need a thousand gargoyles « Last Edit: July 07, 2019, 07:30:55 pm by iancudorinmarian »

blarg: