User:Irismus/SandboxPage



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 resistance. A hero's magic resistance can be passively increased with talents, certain items, and some abilities. Magic resistance of any unit can also be temporarily increased or reduced with some abilities.

Total magic resistance is defined as

Magic Resistance = 1 - (1 - Base Magic Resistance) × $$\prod_{i=1}^{n}$$(1 - Magic Resistance Modifiers i )

Base Magic Resistance
Base Magic Resistance is a value that never changes throughout a game. It consists of one fixed value set for each unit individually. The base magic resistance of a unit can be a negative number.

Heroes
All heroes currently have the same Base Magic Resistance value:

Base Magic Resistance Negation
Some abilities negate or ignores 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 sources of magic resistance 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,  reduces magic resistance by, down to.

Total Magic Damage
Calculating the total magic damage of an ability involves using a few multipliers, Magic Resistance Multiplier, Actual Base Magic Resistance, Magic Damage Barrier and Magic Damage Negation Sources (if any). The total or actual magic damage dealt is equal to how much health a target immediately loses as a direct result.

Actual magic damage dealt after magic resistance is defined as

 Magic Damage Dealt = (Magical Damage - Magic Damage Barrier - Magic Damage Negations) × (1 - Magic Resistance) 

Magic Damage Barrier absorbs a set amount of magic damage before it is reduced by magic resistance.

Magic Resistance Stacking
Multiple sources of magic resistance 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. All sources of magic resistance modification stack fully with the exception of Ethereal buffs and debuffs.

Total magic resistance is defined as

Magic Resistance = 1 - (1 - Base Magic Resistance) × $$\prod_{i=1}^{n}$$(1 - Magic Resistance Modifiers i )

However, there are a few abilities that directly sets a unit's magic resistance to 100%, e.g..


 * Example 1:


 * have Level 4 and a . What is his current magic resistance?
 * Base hero magic resistance:
 * Bonus magic resistance: :, :
 * Magic resistance reduction: 0 (None)


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


 * 's current magic resistance in this example is %, without factoring in the base magic resistance increase by.


 * Example 2:


 * is at max level under the effect of a Level 4 and a Level 4 . What is his current magic resistance?
 * Base hero magic resistance:
 * Bonus magic resistance: 0 (None)
 * Magic resistance reduction: : -, : -


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


 * 's current magic resistance in this example is %. Magic resistance reduction's calculation is highlighted in red in this example, without factoring in the base magic resistance increase by.

Effective HP
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 (such as basic hero attacks etc.) is modified by armor.

Effective HP against magical damage is defined as

EHP = Σ CurrentHP / (1 - Σ Magic Resistance)

Instead of diminishing effectiveness, multiple sources of the same resistance value are more effective stacked. Two sources of % resistance stacked provides %, extra EHP whereas one source provides %.

Examples

 * Example 1


 * at max level has health with Level 4  and a, how much EHP against magical damage he has?


 * According to the previous example in magic resistance stacking above, with Level 4  and a  has a magic resistance of % (or ).
 * Base magic resistance:
 * Bonus magic resistance: :, :


 * EHPm
 * = / (1 - )


 * has EHP against magical damage in this example.


 * Example 2


 * has health at max level. While under the effect of a Level 4  and Level 4, how much EHP against magical damage he has?


 * According to the previous example in magic resistance stacking above, who is affected by those two abilities will have a magic resistance of % (or ).
 * Base hero magic resistance:
 * Bonus magic resistance: 0 (None)
 * Magic resistance reduction: :, :


 * EHPm
 * = / (1 -  )


 * has EHP against magical damage in this example.

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

Magic Resistance Increasing Sources
The only way to improve a hero's base magic resistance is to increase its, which is gained by leveling up, acquiring certain items, or with the help of certain abilities.

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.

Spell Immunity


A unit having 100% magic resistance does not equal to being spell immune. Therefore, Spell Immunity and Magic Resistance are separate and different mechanics.

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