Magic Resistance

Magic Resistance is a stat that reduces (or increases, if negative) magical damage a unit takes from spells and magic attacks. Every unit is capable of gaining or losing magic resistance, and most units start with a small amount of base magic resistance. A hero's magic resistance can be passively increased with talents, certain items, and some abilities. The magic resistance of any unit can also be temporarily increased or reduced with some abilities.

Equations
The total magic resistance displayed on the HUD and the incoming magical damage multiplier can be defined as:

Total Magic Resistance = 1 - Magical Damage Multiplier

Magical Damage Multipler = [1 - Negation Multiplier × (Base Magic Resistance + × )] × $$\prod_{i=1}^{n}$$(1 - Magic Resistance Modifiers i )

For illusions, all Magic Resistance Modifiying sources will be set to 0, since illusion do not benefit form magic resistance bonus.

The magical damage multiplier is applied to all incoming magical damage sources to calculate the total magic damage received, after being reduced by damage barrier sources.

Actual Magic Damage Received
The total or actual magic damage dealt is equal to how much health a target immediately loses as a direct result. The incoming damage received is calculated using a few variables and multipliers:


 * Actual Magical Damage Received
 * Total Magical Damage
 * - Magic Damage Block
 * - Magic Damage Barrier
 * × Magic Resistance Multiplier
 * × Other Generic Damage Manipulation Sources

Set Magic Resistance
Sets a unit's magic resistance to a fixed value for the duration.

Spell Immunity


A unit having 100% magic resistance neither equals being spell immune nor debuff immune. Therefore, all three of these mechanics are separate and different mechanics.

The biggest difference with Magic Resistance is that Spell Immune units do not interact with spell damage at all, while magic resistance reduces incoming magical damage from abilities.

Spell immunity usually are granted to some units as an extra layer of protection, usually on ward-type units, or in combination with invulnerability.

Base Magic Resistance
Base magic resistance consists of one fixed value set for each unit individually, and it can be a negative number.

Base Magic Resistance Negation
Some abilities negate or ignore a unit's base magic resistance by removing a percentage of the base magic resistance on the target. This magic resistance negation only affects the base magic resistance value of units, other magic resistance bonus sources are not affected.

(and 's ) interact with magic resistance differently. Instead of stacking multiplicatively with other sources of magic resistance, it acts as a multiplier for the base magic resistance. These two abilities are currently the only two sources of base magic resistance negation, and it is defined as

This means, for heroes with % base magic resistance, applies a base magic resistance negation multiplier of, reducing the base magic resistance down to.

Stacking
Multiple sources of magic resistance bonus and/or reductions stack multiplicatively. This means a unit's magic resistance value changes less the higher its magic resistance is, and more the lower it is. This prevents a unit from reaching 100% magic resistance by stacking different sources up.


 * Example 1:
 * Multiple Source of the Same Resistance Value
 * has 2 equipped. Without factoring in other ability bonuses, what is her current magic resistance?
 * Base unit magic resistance:
 * Bonus magic resistance: :


 * Total Magic Resistance


 * now has one and an  equipped instead. Without factoring in other ability bonuses, what is her current magic resistance?
 * Base unit magic resistance:
 * Bonus magic resistance: :, :


 * Total Magic Resistance

Instead of diminishing effectiveness, multiple sources of the same resistance value are more effectively stacked compared to two different values.


 * Example 2:
 * Magic Resistance Bonus and Magical Damage Multiplier
 * with level 4 and has a  equipped. Without factoring in the base magic resistance increase by, what is his current magic resistance?
 * Base hero magic resistance:
 * Bonus magic resistance: :, :


 * Total Magic Resistance


 * 's current magic resistance in this example is %, and all incoming magical damage received will now be multiplied by.


 * Example 3:
 * Magic Resistance Reduction and Magical Damage Multiplier
 * is now affected by two magic resistance reduction sources, level 4, a level 4 and.
 * Without factoring in the base magic resistance increase by, what is her current magic resistance?
 * Base hero magic resistance:
 * Magic resistance reduction: : -, : -, -


 * Total Magic Resistance
 * = 1 - (1 - ) * (1 - - ) * (1 - - )


 * 's current magic resistance in this example is %, and all incoming magical damage received will now be multiplied by.
 * The ethereal magic resistance reduction is not factored into the calculations because has a higher magic resistance reduction value than.

Effective Health
The total amount of magic damage a unit can take due to magic resistance is known as Effective HP (or EHP). Despite each source of magic resistance increasing the magic resistance value less the higher it is and making them seem less effective, each source increases the unit's effective HP against magic damage by their base value.

A unit with 0% magic resistance has 100% effective HP against magical damage, which means magical damage equaling 100% of its health is required to kill it. All heroes have % magic resistance by default, making their effective HP against magical damage %.

This definition of EHP assumes all damage taken is magic damage. EHP against physical damage (e.g. basic hero attacks etc.) is modified by armor.

Effective HP against magical damage is defined as

EHP = Σ CurrentHP / Magical Damage Multiplier


 * Example 1
 * is Level 6 and has a health, what is her EHP against magical damage?
 * Base magic resistance:


 * EHPmagic


 * has EHP against magical damage in this example.


 * Example 2
 * from Example 1 now is affected by two magic resistance reduction sources, a level 4 and level 4 . What is her EHP against magical damage now?
 * Health:
 * Base magic resistance:
 * Magic resistance reduction: : -, : -


 * Total Magic Resistance
 * = 1 - (1 - ) * (1 - - ) * (1 - - )


 * EHPmagic


 * has EHP against magical damage in this example.

Modifying Magic Resistance
Several abilities and items have abilities that grant or reduce magic resistance.

Debuff Immunity
Debuff Immunity stops most effects of debuffs' effects on a unit without dispelling the debuffs while granting magic resistance bonus as an effect. The following abilities grant debuff immunity and magic resistance bonus.

Talents
With the % magic resistance and no other sources of magic resistance, the following heroes with bonus magic resistance talents effectively have their magic resistance increased up to:

Besides these, the following heroes have talents that increase the magic resistance of the units they summon

Items
These items grant bonus percentage-based magic resistance values to the hero who has them equipped.

Recent Changes
Resistência mágica Сопротивление магии 魔法抗性