Auto-translated
Well done! This is exactly what was needed 7 years ago, and it's still relevant now!
It might be late to post this, but for those who love digging into the details, it might come in handy someday... The detailed methodology for calculating damage dealt in battle is as follows:
***
There are four main parameters, the sum of which determines the total amount of damage
D(sum) that your unit can deal to an opponent:
1. Your unit's base damage D(bas).
2. The base damage modifier MD(bas), which depends on the comparative characteristics of your unit's Attack and the victim's Defense.
3. The offense modifier M(of), which depends on the presence and level of the Offense secondary skill for your hero and the Armor skill for the enemy hero.
4. The luck modifier M(luck), which manifests if Luck is triggered in the current battle round (Note: we are not considering Morale triggers, as that is simply an opportunity to repeat a turn in the current battle round, and total damage calculation in that case is done separately).
D(sum) = D(bas)+MD(bas)+M(of)+ M(luck)
All other modifiers, including all possible spells, hero specializations, and unit specializations, only modify one or more of the parameters listed above.
Let's examine these parameters in more detail:
1. Unit Base Damage
One of the main skills listed in the unit characteristics. Each unit has a certain value range [Dmin;Dmax], within which the base damage is taken to calculate the total damage amount. The value is chosen randomly in each battle round. A few units are exceptions, as they have strictly fixed base damage: Peasant (1), Wizard (14), Naga (20), Royal Naga (30), Angel and Archangel (50), Rust Dragon (50).
There are two spells in the game capable of modifying base damage (we will consider only the expert skill of the school of magic):
* Bless – all units deal fixed base damage equal to (Dmax + 1).
* Curse - all units deal fixed base damage equal to 0.8*(Dmin -1).
Base damage is a mandatory component for calculating the final damage sum.
2. Base Damage Modifier
This criterion is the most significant in the total damage calculation and depends exclusively on the comparative characteristics of your unit's attack value and the enemy unit's defense value.
Attack (Att) is defined as the sum of the attack power set by the developers for each unit (a constant value) and your hero's primary Attack skill (including all equipped artifacts), while also accounting for all active spells modifying the unit's attack.
Similarly, the victim's defense (Def) consists of the unit's own defense value plus the enemy hero's primary Defense skill value (including artifacts) and all spells modifying the opponent's defense.
As a result of comparing these two parameters, the base damage modifier is calculated according to the following scheme:
- in the case where the attacking unit's attack is greater than the victim's defense, for each unit of difference, the modifier increases by 5% of the base damage value
- in the case where the attacking unit's attack is less than the victim's defense, for each unit of difference, the modifier increases by 2.5% of the base damage value, whereby the modifier has a negative sign. That is, it ultimately reduces the unit's total damage
- in the case of equality between attack and defense parameters, the base damage modifier is zero.
МD(bas) = D(bas)*(Att -Def)*0.05 (if attack > defense) *
MD(bas) = D(bas)*(Att -Def)*0.025 (if attack < defense)
*It is important to remember that the maximum value the base damage modifier MD(bas) can take is +3.0*D(bas), and the minimum value is -0.7*D(bas). In the first case, attack exceeds defense by 60 points; in the second, defense exceeds attack by 28 points. Further growth of the attack/defense delta will no longer provide any advantage to anyone.
There are 8 spells in the game capable of modifying the attack and defense skills of both combatants, which automatically leads to a change in the balance of power and a recalculation of the damage modifier МD(bas). For ease of calculation, we will consider the effect of all modifier spells from the attacker's perspective; that is, we are primarily interested in the application of spells that can affect the damage dealt by this unit.
Changing the attacker's attack:
* Bloodlust – adds +6 to attack for all units
* Berserk - adds double the amount of defense points to the specified unit's attack (the unit's defense is reset to zero)
* Executioner – adds +8 to attack against all units of level 7 and above
* Prayer – adds +4 to attack, defense, and speed for all units
* Precision - adds +6 to attack for all shooting units
* Weakness – reduces the attack of all units by 6 points
Changing the victim's defense:
* Stone Skin - adds +6 to defense for all units
* Prayer – adds +4 to attack, defense, and speed for all units (listed again because this spell can be cast on both opponents, leading to a mutual compensation of the effect)
* Disintegrate Ray - reduces the defense of all units by 5 points. This is the only listed spell whose effect lasts until the end of the battle or until Dispel Magic is used. Another feature of this spell is that it can be cast multiple times on a single unit, and the effect will stack; meaning a unit's defense can be reduced to zero over several battle rounds.
A characteristic of using these spells is the possibility of simultaneous use, where spells with different vectors of action mutually compensate for each other but do not neutralize them. For example, Bloodlust and Weakness applied to one unit result in no change to its attack due to equal absolute values. However, after one of the spells expires, the effect of the second remains.
Thus, it is important to understand that all the above-mentioned spells affect only one of the parameters constituting total damage, namely - the base damage modifier. These 8 influence spells have no effect on any other total damage parameters.
And the effect of applying these spells will depend on the significance of the base damage modifier for each specific unit. For example, if the attacker's attack is greater than the victim's defense, the Bloodlust spell will increase total damage by 6*5%=30% (of the base damage value). The effect of this spell for such a unit exactly corresponds to the expert Offense secondary skill. However, if the attacker's attack is significantly less than the victim's defense, the effect of the spell will be twice as weak and amount to only 6*2.5%=15% of the base damage value.
Based on the above, it is easy to trace the advantages and disadvantages of a particular spell in each specific case. For example, for units such as Spearman, Fairy, Harpy, or Cerberus, which have a wide range of base damage, an expert Bless will look much more effective, increasing base damage at least twofold (and this will be reflected in all components of the sum!), than Bloodlust, which although it gives a seeming +6 strength in attack, ultimately brings only 30% of the base damage for only one of the four addends.
3. Offense Modifier M(of)
The third component of total damage - the offense modifier M(of) depends on the level of development of the Offense secondary skill (if it is present among the hero's skills) and amounts to 10-30% of the base damage D(bas). The base damage modifier is not applied in the calculation of this parameter; that is, none of the above spells or artifacts will change this component of total damage. It is strictly fixed and determined only by the random base damage in each battle round.
Special attention should be paid to heroes who have an Offense specialization (Crag Hack and Gundula). These heroes have a bonus that increases the offense modifier (and only it) by 5% for every level of experience achieved.
It should be noted that these percentages are relative, not absolute.
That is, a tenth-level Offense specialist with an expert Offense skill (bonus +30% base damage) will ultimately have M(of) = 30*(1+0.05*10 Level) = 45%, but not 30+5*10 = 80%, as is sometimes mistakenly calculated :)
Since an offense specialist initially has the basic Offense skill, their bonus at the start is M(of) = 10*(1+0.05*1 Level)=10.5% of base damage. The maximum achievable level in the game is 108 Level, which would allow a specialist in this case to have a bonus M(of) = 30*(1+0.05*108 Level) = 192% of base damage.
4. Luck Modifier M(luck)
The simplest and most understandable modifier of the four. Because in the event that luck triggers during an attack, the unit deals additional damage equal to the base damage D(bas) determined for this battle round. Obviously, if a Bless spell is cast on the unit, for example, the luck damage will be (Dmax + 1).
The only known feature of this modifier is that when calculating damage from a unit that can attack several enemy stacks at once (Hydras, Psychic Elementals), luck applies only to the unit actually being attacked. The others receive standard damage without considering the luck modifier.
5. Total Damage Modifiers
5.1. Spells
It is necessary to separately mention the three remaining spells that modify the total damage dealt to a unit.
* Shield – reduces by 30% the total damage dealt to a unit in melee combat. That is, it simultaneously affects all four components of the attacker's total damage.
* Air Shield - reduces by 50% the total damage dealt to a unit from ranged attacks.
* Forgetfulness - reduces the total damage dealt by all shooting units by 50% (at basic Water Magic skill); at advanced and expert levels, the unit loses the ability to shoot until the spell expires. The unit's ability to attack in melee is preserved.
The first of the two proposed spells is often paired with the Stone Skin spell, and almost every player has probably asked themselves which of these two spells is more effective. Well, my opinion is that if there is a choice between Stone Skin and Shield, Shield will be more effective because Stone Skin reduces only the attacker's base damage modifier (one of the total damage addends) by 15-30%. At the same time, Shield removes 30% of the entire total damage value (which is always more effective).
The effect of the second of the two proposed spells is essentially similar to the first; however, there is one significant bug that must be considered when using Air Shield – if this spell is cast on a unit, instead of half damage, it receives double damage from shooting towers during a city siege. This can significantly complicate the capture process if you are unaware of this nuance.
5.2. Armor Secondary Skill
Similar to the Shield spell, the Armor skill affects the total damage dealt to a unit and reduces it by 5-15% depending on the level of development of this skill. For specialists in the Armor secondary skill (Mephala, Niel, Tazar), we apply the same calculation mechanism as for Offense specialists - for every level of experience achieved, the secondary skill bonus increases by 5% (relative).
Also, I think it should be undisputed that an expert in the Armor skill will in most cases save more hit points from an attacker than an expert Offense secondary skill would bring to that same attacker, even considering that in relative terms (15% vs 30% for Offense) it looks less impressive. It is applied last in the calculation and complements the effect of the Shield or Air Shield spell.
***
That's probably all the information on this murky topic.
If anyone has questions or comments - send emails, we'll discuss... :)
