Thread:FixSRwiki/@comment-46261745-20201002230402/@comment-46261745-20201003130358

As for the math, let me work this out

Magic damage = max(10, calculated mDamage)

Calculated mDamage = Magic  attack - Magic defence

Magic attack = (Base class MDamage  -  10 (for enemy diviner guard)) + (INT * 10 * ((100+Buffs) / 100))

- Note that the Base class MDmage - diviner guard should not be able to go negative. There's a default 5 base damage. Mages have 45 base, Diviners 40 base, Monks and Mikos have 20 base.

- The Base class damage for a fiend mage appears to be the default of 5... Mages have 45, so I'm not sure why fiend mages are so weak...

Magical defence = INT * 7 * ((100+buffs) / 100)

Interesting, so that's all calculated before troop multipliers. somehow magical defence stats don't get weakened by high troop counts, but the attack overall will.

So for the troop adjustment we're looking at 500 * Magical damage + (541/2 * Magical damage) (with troop adjustment for the attacker's 1041 troops

Then that is multiplied by 0.5 (the damage effectiveness of Lightning)

If we substitute your INT stat in there as aINT, we should be able to find out the enemy INT stat eINT...

min( troopCount, (( max(10, ( (eINT * 10  + (5-10) ) - aINT * 0.7) * 770) / 100) * 0.5) = 98