This guide describes how damage is calculated in Warlock - Master of the Arcane, v1.4.1.1. Both the damage of regular attacks and the power of actions are covered.
Definitions[]
Some terms must be defined before the calculations can be discussed. The following terms are used in this guide.
Attack Methods[]
Damage can be delivered either as a close-combat attack or as a ranged attack. The terms close-combat attack and ranged attack are used to avoid mixing them with the damage types specified below. A close-combat attack can only be performed on an adjacent unit or building, i.e. the unit must be next to the unit or building in order to attack it. A ranged attack can be used to attack any unit or building within the range of the attacker, including adjacent units and buildings.
Damage Types[]
There are 6 types of damage. These are:
When specifying damage, a number followed one of these symbols are used. For example, 5 means Melee damage of strength 5, while 10 means Elemental Magic damage of strength 10.
Base Attack[]
All calculations are based on the base attack of a unit. This number is the core of both the strength of its regular attack and the power of all its actions.
- BaseAttack - BaseAttack is the sole attack of the unit when all bonuses are removed. The damage type is included. Normally, if a unit has a single damage number it is equal to its base attack.
The absolute value notation is used if only the value is wanted without the damage type. The absolute value of BaseAttack will be written as |BaseAttack|.
Example: The Warriors unit below has BaseAttack = 9 and |BaseAttack| = 9, while the Mages unit has BaseAttack = 17 and |BaseAttack| = 17.
Bonuses[]
There are three types of bonuses: Damage bonuses, Power bonuses, and Healing bonuses.
- DamageBonus - DamageBonus is a bonus to a specific damage type. It is written as a percentage number, and a damage type. For instance: 25%, which is a 25% Elemental Magic damage bonus. Damage bonuses of the same type are added together before they are multiplied with the BaseAttack of the unit (see Calculations below).
- PowerBonus - Power bonuses are the strongest bonuses in the game. They generally increase everything the unit does. It is written as a factor and is applied directly to the current numbers of the unit, both its regular attack and the power of its actions. For instance a unit power bonus of 20% is written as 1.20. Power bonuses are always multiplied with each other (see Calculations below).
- HealingBonus - HealingBonus works similar to PowerBonus, but affects only actions that heal damage. It is written as a factor just like a power bonus.
Example: When a fighter unit levels up to level 2 it can choose to pick Furious Charge (Damage: +20% Melee). This is a Melee damage bonus and will be written as 20%. If a city has a Dwarven Forge building, the upgrade perk Dwarven Steel (Unit power: +20%) can be bought for 100 gold. This is a power bonus and will be written as 1.20. When a healer unit levels up to level 2 it can choose to pick Healing Power (Healing power: +20%). This is a healing bonus and will be written as 1.20.
Actions[]
There are two important terms with regards to actions that deal or heal damage. These are:
- Power - Actions that deal or heal damage have a number that specify how much damage they deal or how much damage they can heal. This number is the Power of the action. Power is without damage type.
- Strength - Power is based on |BaseAttack| of the unit. The power of the action is often not equal to |BaseAttack|, but is a factor higher or lower than it. Strength is the factorial difference of |BaseAttack| and Power when all bonuses are removed. In that case Power = |BaseAttack| * Strength. Strength is written as a percentage. For instance 125% means Power is equal to 1.25 * |BaseAttack|. Unfortunately, the game does not display the strength of an action.
Example: The Ice Arrow action of the Mages unit has a damage of 18.7 as seen below. In this case Power = 18.7, and Strength = Power / |BaseAttack| = 18.7 / 17 = 1.1 = 110%.
Calculations[]
The formulas below will use the following mathematical notations:
- - This symbol means the sum of all variables. For instance DamageBonus means the sum of all the damage bonuses the unit has. In this case the damage types are retained. A sum of all the damage bonuses without the damage types will be written as |DamageBonus|. If a unit has no damage bonusesDamageBonus = 0.
- - This symbol means the product of all variables. For instance PowerBonus means the product of all the power bonuses the unit has. If a unit has no power bonuses PowerBonus = 1.
Regular Attack[]
The formula for the damage of a unit's regular attack is:
Basically, all the damage bonuses are added together and multiplied with the base attack value. The base attack of the unit is added as well. Finally everything is multiplied by the power bonuses of the unit.
Example 1: The Warriors unit above has BaseAttack = 9 and no damage or power bonuses. In this case the formula will be (the source of each value is written within []):
- RegularAttack = (9[BaseAttack] + 9[|BaseAttack|]*0[No damage bonuses]) * 1[No power bonuses] = (9 + 9*0) * 1 = 9
Example 2: A mages unit has bought University Education (Unit power: +10%) for 100 gold and Magical Transformer (Unit power: +20%) for 150 gold. Furthermore, it has selected Elemental Wrath (Damage: +20% Elemental Magic) at level 2 and School of Necromancy (Damage: +30% Death Magic) at level 3. Lastly the spell Frost Weapon Enchant has given it Frost Weapon (Damage: +20% Elemental Magic), and the spell Life Weapon Enchant has given it Life Weapon (Damage: +50% Life Magic). In this case the formula will be (the source of each value is written within []):
- 1.10[University Education] * 1.20[Magical Transformer] =
Rounded off to one decimal this is exactly what the game displays in the damage breakdown. The total damage is:
- |RegularAttack| = 31.416 + 6.732 + 11.22 = 49.368.
Reverse calculation[]
Some units have innate perks that gives them damage bonuses. Normally, these damage bonuses are to other damage types than their base attack. In those cases it is trivial to figure out the base attack of the unit: it is the number that is not there due to a damage bonus.
Example: A Rogues unit has the innate perk Poison (Damage: +50% Death Magic). The damage of the Rogues unit is 8 + 4, for a total of 12. The Poison perk is responsible for the 4, thus its BaseAttack = 8.
It is possible to calculate the base attack of a unit from any given situation. In order to do that the easiest approach is to use the formula without damage types, and solve it with respect to BaseAttack. The formula without damage types looks like this:
- <=>
Example: The Mages unit from the example above is a perfect candidate to illustrate this. It has the following power bonuses: University Education (Unit power: +10%), Magical Transformer (Unit power: +20%); and the following damage bonuses: Elemental Wrath (Damage: +20% Elemental Magic), School of Necromancy (Damage: +30% Death Magic), Frost Weapon (Damage: +20% Elemental Magic), Life Weapon (Damage: +50% Life Magic). The formula will be (the source of each value is written within []):
- |BaseAttack| = 49[Regular attack shown by the game] /
- (1.10[University Education] * 1.20[Magical Transformer]) /
- (1 + 20%[Elemental Wrath] + 30%[School of Necromancy] + 20%[Frost Weapon] + 50%[Life Weapon]) =
- 49 / (1.10 * 1.20) / (1 + 0.20 + 0.30 + 0.20 + 0.50) =
- 49 / 1.32 / 2.2 = 16.87
Remember that total damage number reported by the game is rounded off to zero decimals, which will cause the result to be a bit inaccurate. Alternatively, it is possible to add together the damages shown in the breakdown. In this case: 31.4+6.7+11.2 = 49.3. Using 49.3 instead of 49 will give |BaseAttack| = 49.3 / 1.32 / 2.2 = 16.98. This is more accurate since the Mages unit has BaseAttack = 17.
Actions[]
There are three types of actions. These are:
- Healing Actions - Actions that heals damage is classified as healing actions. Healing actions do not gain any benefits from damage bonuses. They get bonuses from power bonuses and healing bonuses.
- Attack Actions - Actions that deals damage is classified as attack actions. Attack actions do not gain any benefits from healing bonuses. They get bonuses from power bonuses and damage bonuses.
- Other Actions - All actions that do not heal or deal damage are classified as other actions. Other actions do not gain any benefits from any kind of bonuses. Examples are teleport actions, summon actions, and the build city action.
Healing Actions[]
The formula for how much damage a healing action heals is the following:
Example 1: The Clerics unit has the Basic Healing action. Basic Healing has Strength = 100%. For a Clerics unit with no bonuses the formula will be (the source of each value is written within []):
- Power = 8[|BaseAttack|] * 100%[Strength] * 1[No healing bonuses] * 1[No power bonuses] =
- 8 * 1.00 * 1 * 1 = 8
Example 2: Later in the game the same Clerics unit has gained a couple of levels and has bought some perks as well. At level 2 it picked Healing Power (Healing power: +20%), and at level 3 it picked Life Attack (Damage: +30% Life Magic). It has also bought University Education (Unit power: +10%) and Magical Transformer (Unit power: +20%). In this case the formula will be (the source of each value is written within []):
- Power = 8[|BaseAttack|] * 100%[Strength] * 1.20[Healing Power] *
- (1.10[University Education] * 1.20[Magical Transformer]) =
- 8 * 1.00 * 1.20 * (1.10 * 1.20) = 12.672
Notice that the Basic Healing action is not affected at all by the Life Attack perk. Life Attack is a damage bonus and does not affect healing actions.
Attack Actions[]
The formula for how much damage an attack action does is the following:
Example 1: The Ice Arrow action of the Mages unit is an attack action. It has Strength = 110%. For a Mages unit with no bonuses the formula will be (the source of each value is written within []):
- Power = 17[|BaseAttack|] * (110%[Strength] + 0[no damage bonuses]) * 1[No power bonuses] =
- 17 * (1.10 + 0) * 1 = 18.7
Example 2: The Mages unit from above is again used as an example. It has the following power bonuses: University Education (Unit power: +10%), Magical Transformer (Unit power: +20%); and the following damage bonuses: Elemental Wrath (Damage: +20% Elemental Magic), School of Necromancy (Damage: +30% Death Magic), Frost Weapon (Damage: +20% Elemental Magic), Life Weapon (Damage: +50% Life Magic). The formula will be (the source of each value is written within []):
- Power = 17[|BaseAttack|] * (110%[Strength] +
- (20%[Elemental Wrath] + 30%[School of Necromancy] + 20%[Frost Weapon] + 50%[Life Weapon])) *
- (1.10[University Education] * 1.20[Magical Transformer]) =
- 17 * (1.10 + 0.20 + 0.30 + 0.20 + 0.50) * (1.10 * 1.20) =
- 17 * 2.30 * 1.32 = 51.612
Reverse calculation[]
The strength of an attack action can be determined by using reverse calculation. In order to do that the formula must be solved with respect to Strength:
- <=>
Example: The Ice Arrow attack action of the Mages unit is used in this example. The Mages unit has the following perks: University Education (Unit power: +10%), Magical Transformer (Unit power: +20%), Elemental Wrath (Damage: +20% Elemental Magic), School of Necromancy (Damage: +30% Death Magic), Frost Weapon (Damage: +20% Elemental Magic), Life Weapon (Damage: +50% Life Magic). The formula will be (the source of each value is written within []):
- Strength = 51.6[Power of Ice Arrow as shown in the game] / 17[|BaseAttack|] /
- (1.10[University Education] * 1.20[Magical Transformer]) -
- (20%[Elemental Wrath] + 30%[School of Necromancy] + 20%[Frost Weapon] + 50%[Life Weapon]) =
- 51.6 / 17 / (1.10 * 1.20) - (0.20 + 0.30 + 0.20 + 0.50) =
- 51.6 / 17 / 1.32 - 1.20 = 1.099465 = 110%
Rejected Damage Bonuses[]
Most attack actions are affected by all types of damage bonuses. There are some attack actions, however, that reject one or two specific damage bonus types. A bonus of that damage type does not affect the damage dealt by the attack action. Unfortunately, the game does not communicate this information. The only way to find out is to see if a specific damage type affects the damage of an attack action or not.
If a specific damage bonus type is rejected by an attack action, it is not wasted. Instead, it is added to another attack action or to the regular attack of the unit. If the unit has an attack action that deals the same type of damage as the rejected damage bonus, it is added to that action. If no such attack action exists, it is added to the regular attack of the unit.
Example: The Sorcerers of Angil unit can be used to illustrate both behaviors. It has BaseAttack = 21 and two attack actions. The first attack action is Force of the Elements. It does 25.2 damage, has Strength = 120%, and rejects damage bonuses. The second attack action is Strength of Mind. It does 21 damage, has Strength = 100%, and rejects both and damage bonuses. In this case all damage bonuses will be added to Force of the Elements twice, since Strength of Mind rejects them and since the damage type of Force of the Elements is . All damage bonuses will be added to the regular attack of the unit trice, since both Force of the Elements and Strength of Mind rejects them and since the unit does not have an attack action that deals damage. The Sorcerers of Angil unit is given the following perks: University Education (Unit power: +10%), Magical Transformer (Unit power: +20%), Elemental Wrath (Damage: +20% Elemental Magic), Vampiric Weapon (Damage: +50% Death Magic), Life Weapon (Damage: +50% Life Magic), Frost Weapon (Damage: +20% Elemental Magic). The formulas will be (the source of each value is written within []):
- (1.10[University Education] * 1.20[Magical Transformer]) =
- |RegularAttack| = 69.3 + 11.088 + 13.86 = 94.248
Force of the Elements (no damage bonuses):
- Power = 21[|BaseAttack|] * (120%[Strength] +
- (20%[Elemental Wrath]*2 + 50%[Life Weapon] + 20%[Frost Weapon]*2)) *
- (1.10[University Education] * 1.20[Magical Transformer]) =
- 21 * (1.20 + 0.20*2 + 0.50 + 0.20*2) * (1.10 * 1.20) =
- 21 * 2.50 * 1.32 = 69.3
Strength of Mind (no or damage bonuses):
- Power = 21[|BaseAttack|] * (100%[Strength] + 50%[Life Weapon]) *
- (1.10[University Education] * 1.20[Magical Transformer]) =
- 21 * (1.00 + 0.50) * (1.10 * 1.20) =
- 21 * 1.50 * 1.32 = 41.58