What is the calculation behind Attack, Defense and Spellpower?

Every creature has a base Attack / Defense score.

When combat starts, your creatures get a bonus to Attack / Defense equal to your Hero's Attack / Defense scores.

If a creature's combined attack is greater than their target's defense, they take an additional 5% damage per point of difference, up to a cap of +300% damage (when attack is 60 greater than defense)

Conversely, if a creature's combined attack is less than their target's defense, they deal 2.5% less damage, down to 70% (when defense is 12 greater than attack).

Spellpower's exact effect varies depending on the spell. For instance, Magic Arrow does (10 * spell power) + 10 damage.

Haste has a constant effect and lasts Spell Power turns in duration.


About defense reduction in accepted answer: 70% is delta (coefficient 0.3), so defense-attack limit is 28 (not 12). If hero has offense / armor - it becomes more complicated: coefficients 1.1/1.2/1.3 for offender-damage (direct melee, not retaliation) and 0.95/0.90/0.85 armourer-received-damage (for basic/advanced/expert level).

For precise formula one sould also count offense/armor specialists (crack,gundula / tazar,neela,mephala). Same for archery, ballista, spells, specialists for them (and for creatures: galthran/shakti etc.), creature capabilities (there is champion's bonus, but not vs alebards; angels produce 50% more damage against devils etc.).

Unfortunatly on mightandmagic.wikia.com formula is incorrect (e.g. attack/deffense should be separated), more correct manual on russian-funsite: section "combat", search by "D(bas)" (maybe google-traslate could give comprehensable result).

Since game is somewhat popular there is also: damage-calculator. One could always check VCMI sources, but i'm not sure if it's 100% correspondce to homm3 system.


For spell power, here's a list of spells and how Power affects them.

Duration (turns)

The number of turns these spells last in battle is equal to Power

  • ️Haste, Fortune, Precision, Air Shield, Protection From Air, Counterstrike, Magic Mirror
  • Bloodlust, Curse, Protection From Fire, Blind, Misfortune, Fire Shield, Slayer
  • ⛰️Shield, Slow, Stoneskin, Protection From Earth, Anti Magic, Sorrow
  • Bless, Protection from Water, Weakness, Forgetfulness, Mirth, Prayer

Damage

These spells do damage based on Power with a multiplier ranging from 5 to 75. The additional numbers indicate the effect of Basic/Advanced/Expert Magic in that area (Air, Fire, Earth, or Water).

  • ️⛰️Magic Arrow (power * 10 + 10/20/30)
  • ️Lightning Bolt (power * 25 + 10/20/50)
  • ️Destroy Undead (power * 10 + 10/20/50)
  • ️Chain Lightning (initial hit power * 40 + 25/50/100)
  • Fire Wall (power * 10 + 10/20/50)
  • Fire Ball (power * 10 + 15/30/60)
  • Land Mine (power * 10 + 25/50/100)
  • Armageddon (power * 50 + 30/60/120)
  • Inferno (power * 10 + 20/40/80)
  • ⛰️Death Ripple (power * 5 + 10/20/30)
  • ⛰️Meteor Shower (power * 25 + 25/50/100)
  • ⛰️Implosion (power * 75 + 100/200/300)
  • Ice Bolt (power * 20 + 10/20/30)
  • Frost Ring (power * 10 + 15/30/60)

Health points affected

These spells use Power to determine how many health points of creatures are hypnotized, healed, or resurrected/reanimated.

  • ️Hypnotize (stack must have total health < single creature health * 25 + 10/20/50)
  • Cure (heals power * 5 + 10/20/30)
  • Sacrifice (resurrects health (power + destroyed troop's health + 3/6/10) * # sacrificed)
  • ⛰️Animate Dead (reanimates health power * 50 + 30/60/160 [sic])
  • ⛰️Resurrection (resurrects health power * 50 + 40/80/160)

Range on map

For this spell, Power determines how far away on the map from the character the spell can function.

  • ️⛰️Visions (power * 1/2/3, minimum 3)

Number summoned

The number of elementals summoned is based on Power and the level of magic (Basic/Advanced/Expert) for that type.

  • ️⛰️Summon Air/Fire/Earth/Water Elemental (summons power * 2/3/4)

No effect

Power is not used to compute the effect of these spells.

  • ️View Air, Disguise, Disrupting Ray, Dimension Door, Fly
  • Berzerk, Frenzy
  • ⛰️View Earth, Quicksand, Earthquake, Force Field, Town Portal
  • Dispel, Summon Boat, Remove Obstacle, Scuttle Boat, Teleport, Clone, Water Walk

The source of this info is these pages:

  • ️ Air Magic
  • Fire Magic
  • ⛰️ Earth Magic
  • Water Magic