User:Irismus/SandboxPage3

Evasion is mechanic that allows the unit to evade an incoming attack.

All Evasion effects trigger upon landing an attack. This is upon projectile impact and upon attack point for ranged and  melee units respectively. Any attack or ability effects that relies on attacks to hit their targets do not trigger, including most attack modifiers and on-hit effects unless explicitly specified.

True Strike and Accuracy are mechanics that nullifies Evasion.

Equations
All evasion and accuracy sources are determined by pseudo-random distribution as long as their value is neither 0% nor 100%.

The total evasion displayed on the HUD is defined as: Total Evasion = 1 - $$\prod_{i=1}^{n}$$(1 - Evasion i )

Accuracy and Blind sources do not directly increase the attacked unit's evasion value, instead, they increase the effective evasion rate of the attacked unit. For effective evasion rate calculation purposes, multiple sources of evasion and accuracy stack diminishingly with each other respectively, while blind sources stack additively with themselves up to 100% and multiplicatively with evasion.

The total blind multiplier is defined as: Blind Multiplier = 1 - $$\sum_{i=1}^{n}$$Blind i

The total accuracy is defined as: Total Accuracy = 1 - $$\prod_{i=1}^{n}$$(1 - Accuracy i )

While the theoretical chance to evade an attack is diminishing, each source of evasion increases effective HP against physical attacks more than the last due to the mechanic's exponential nature. A more concrete way of thinking about evasion stacking is that for an attack to bypass an evasion stack and hit, the attack must bypass each source of evasion in the sequence below. Only if all sources of evasion fail can the attack deal damage. Effective Evasion Rate = Total Accuracy × (1 - (1 - Total Evasion) × (Blind Multiplier)) × × (1 -  Melee Buffer Range Miss)
 * Incoming Attacks
 * Accuracy Sources or True Strike Sources proc
 * Evasion
 * Uphill Miss Chance proc
 * Melee Buffer Range check
 * Attack Hits

The formula written above are color-coded in sections, where blue indicates the chance that accuracy does not proc, red indicates the chance evasion does not proc and green indicates the uphill miss chance does not proc.

Incoming Attacks Hit Chance = 1 - Effective Evasion Rate × (1 - Total Accuracy )

Miss
Upon missing an attack on an enemy, a red floating text appears, reading, visible to the attacking player only. The enemy, who was just missed by an attack, also sees a floating text, but in white and reading  instead. Furthermore, a missed attack does not play any of the attack impact sounds.

Attack Range Type
For melee units, if the target is farther than  range more than the melee unit's attack range, the attack 100% misses, True Strike does not guarantee hits on units outside of the buffer range.

Uphill Miss Chance
For ranged units without Flying Movement, the uphill miss chance is conditionally applied upon a ranged attack projectile impact and not on the unit's attack point — it causes % of the ranged attacks to miss if the attacking unit is at a lower terrain level as the target, regardless of the terrain level difference. A unit is considered to be on higher elevated terrain when it is no longer visible to the player due to the terrain. When an enemy stands on a relatively higher ramp, uphill miss chance applies whether if the attacked unit is within vision or not.

This means moving up onto an elevated area after an attack projectile has been launched may cause the projectile to miss on impact to uphill miss chance, even when both units were on the same ground level as the projectile was launched.

Uphill miss chance is considered an evasion source, it does not apply to units and units with flying movement.

Blind
Blind is a debuff that makes a unit miss upon attacking other units and sources of blind effects stack additively with each other up to 100%.

Blind Debuff Multiplier is defined as:

Blind Multiplier = 1 - $$\sum_{i=1}^{n}$$Blind i and MAX ( $$\sum_{i=1}^{n}$$Blind i ) = 1





Stacking
All evasion and accuracy sources are determined by pseudo-random distribution as long as their value is neither 0% nor 100%. Uphill Miss Chance is not factored in the following examples.
 * Example 1
 * Interactions between coming attacks and Evasion.
 * grants % evasion.
 * The total evasion chance is % with the item as the only evasion source.


 * Incoming attacks hit chance
 * = 1 -


 * Therefore, incoming attacks have a % chance of hitting the item's wielder.


 * Example 1b
 * within the radius has  evasion.
 * Without any other evasion negating sources, all incoming attacks are missed if is within the radius based on the calculations shown in Example 1a.


 * Example 2a
 * Evasion sources stacks diminishingly.
 * An enemy is attacking  who has a  and  . What are the chances of incoming attacks hitting ?


 * Evasion sources:


 * Total evasion chance
 * = 1 - (1 - ) × (1 - )


 * Incoming attacks hit chance
 * = 1 -


 * in this example has % evasion. Therefore, she has % chance of getting hit by incoming attacks.


 * Example 2b
 * Blind sources stack additively of itself, then stacks diminishingly with evasion sources.
 * An enemy is now affected by  and, she is still attacking  from the previous example. What are the chances of incoming attacks hitting ?


 * Evasion sources:


 * Blind sources:


 * 's effective evasion rate
 * = 1 - [(1 - ) × (1 - )] × [ 1 - ( + ) ]


 * Incoming attacks hit chance
 * = 1 -


 * For this example, the blind debuff multiplier is marked in red.
 * Although 's total evasion did not change, the blind applied to increases 's effective evasion rate to %. Therefore,  has % chance of getting hit by 's incoming attacks.


 * Example 3a
 * Accuracy Calculations
 * An enemy is now affected by two unknown accuracy sources of % and % respectively. What is her current accuracy chance against evasion?


 * Total Accuracy
 * = 1 - (1 - ) × (1 - )


 * 's attacks have a total accuracy of against the attacked unit's effective evasion rate.


 * Example 3b
 * When Evasion and Accuracy procs at the same time.
 * An enemy of Example 3a now attacks  from the previous example.
 * What are the chances of incoming attacks hitting ?


 * 's total evasion chance =
 * 's total accuracy chance =


 * 's effective evasion rate


 * Incoming attacks hit chance
 * = 1 - × (1 -  )


 * For this example, the total accuracy and total evasion are marked in blue and red respectively. 's total evasion does not change.
 * The incoming attacks' hit chance is % only when both parties' accuracy and evasion procs at the same time.


 * Example 3c
 * 100% Accuracy
 * from the previous example is now affected by that applies a 100% accuracy debuff on her. How does accuracy affect the effective evasion rate calculation?


 * 's total evasion chance =


 * Incoming attacks to hit chance:
 * = 1 - ( 1 - 1 ) ×
 * = 1


 * For this example, the total accuracy is marked in blue.
 * 100% accuracy reduces 's effective evasion rate to none. She has a 100% chance of getting hit by incoming attacks regardless of her current effective evasion rate.
 * Therefore, the hit chance for an incoming attack has a range of 0 to 1, with 0 the attack completely being evaded; with 1 the attack being connected, and dealing its attack damage.

Items
The following items grants the wielder an evasion bonus.

Accuracy
Accuracy is applied as a debuff on the affected target. It does not directly increase the attacked unit's evasion value. For calculation purposes, the accuracy multiplier can be considered as an evasion source as well.

Total Accuracy = 1 - $$\prod_{i=1}^{n}$$(1 - Accuracy i )

True Strike sources can also be considered as outgoing accuracy.

True Strike
True Strike prevents the unit's attacks from missing, negating both evasion and blind sources against any other units, including ward-type units and ally units, except attacks against buildings. However, it does not apply an Accuracy debuff on the attacked unit.

For ranged units, although True Strike prevents the unit's attack from missing, attack projectiles of ranged units with True Strike can still be disjointed. For melee units, it also prevents the attacking unit's attack from missing when the attacked target moves more than  range away upon its attack point.

All attacks against Runes and against destroyable items have True Strike.

Outgoing
The following accuracy sources grant a chance-based conditional True Strike that proc on the attack.

Recent Changes
Уклонение 闪避