Birtles, DarkBrady and others discovered that Hero’s Intelligence affects defense, although in reality, to an all-but-useless degree. After some rigorous testing, I concluded the same thing, though I found it doesn’t quite work the same for workers and scouts. In this post, I describe the basic formulas Evony uses to determine life and death and provide a table so you can compare the units “effective life” at various levels of hero intelligence.
UnitsKilled = ( AttackingUnits * Damage ) / ( Health / Defense )
Health = BaseHealth * (1 + Medicine / 20 )
Damage = FLOOR( AttackModifier * UnitBaseAttack ) * RangeModifier
AttackModifier = ( 1 + HeroAttack / 100 + MilTradition / 20 ) * HornModifier
RangeMod varies for ranged units (advanced topic covered in another post), and the HornModifier is 1.2 if WarHorn or IvoryHorn is in use and otherwise 1. The “FLOOR” function truncates any fraction, i.e., 2.99 becomes 2.
The real trick is determining the formula for Defense. DarkBrady and others did that, and I merely confirmed it and factored in the use of the corselet. However showing the formula won’t help you much unless you first understand where it comes from.
One way to think of Defense is as a “damage reduction” modifier. With buffs, you generally multiply by some base value by 1 plus a percentage. With a reducer, you multiply by 1 minus some percentage. It’s equivalent as if you were to multiply the attacker’s Damage by some fraction and then subtract that from the original Damage value. Either way, you get an “Effective Damage”. So we could have (but did not) shown the formula above to look like this:
… AttackingUnits * ( Damage * ( 1 – DefenseX ) ) / …
But instead, we prefer to think of Defense as a Health Buff. Why? Because it’s generally easier to calculate “Total Health” for a given unit type and given hero, which are known before-hand, than to figure out the damage reduced for each attack. Other than that, there’s no difference. Now, just a short sentence or two ago I said that buffs weregenerally some base multiplied by one plus a percentage. In this case, however, in order to avoid complicated math, we divide Health by one minus the Defense value, like this:
… DefendingUnits * Health / ( 1 – DefenseX )
It turns out, however, and this is very important, that damage reduction is capped — it cannot be reduced by more than 50%. From the defending unit’s viewpoint, its health cannot be more than doubled. This is reasonable — otherwise, killing units might be very difficult! But in effect, it makes the role of Iron Working and Intelligence far less significant than Military Tradition and a Hero’s Attack skill. Putting this cap into a formula, we get this:
Defense = ( 1 – MIN( 50%; UnitDefense * DefenseModifierPercent ) )
So, what does this DefenseModifier look like? It turns out, it looks almost exactly like the AttackModifier as shown above. It is simply this:
DefenseModifier = ( 1 + HeroIntel / 100 + IronWorking / 20 ) * CorseletModifier
The CorseletModifier is 1.2 if one of the Corselet items is in use but is otherwise 1.
Note: For workers and scouts, this modifier is always 1. (The defensive value for these units happens to be 50, despite what is claimed in-game.)
To turn the DefenseModifier into a Percentage, we divide by 1000 to get it into a fraction that will range from 0.02 to 0.5, that is, from 2% to 50%. (Why not 0%? Because the minimum defense value is 20). Putting it all together and doing some very basic algebra to remove percentages, our final formula looks like this:
Defense = ( 1000 – MIN( 500; UnitDefense * DefenseModifier ) ) / 1000
Below is a table showing each unit with its defensive values, the calculated defensive modifiers, and three different hero intelligence levels (5, 20, 80). For this table, iron working and medicine are 10 and the corselet is worn.
@ int 5
@ int 20
@ int 80
The numbers in orange are the defense values that are capped at 500.
So how much intelligence does your hero need to have in order to provide maximum defense for your archers, warriors, and workers? The answer is 684, allowing the archers to have an effective life of 750 and the warriors an effective life of 650.
To get the maximum benefit for pikes under these conditions, you need a defensive modifier of 3.33; so a hero with int 128 and corselet will do. For swords, any hero with int 17 and above will give those troops the maximum effective health of 1050.
For cavalry, a hero with int 82 will max out its effective life at 1500. For phracts, it don’t matter once your Iron Working is 9 — 3000 damage must be dealt to each on to kill it. For Rams the magic number is 111 allowing each one to soak up an incredible 15k of damage.