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
The total evasion displayed on the HUD and can be defined as:

Theoritical Evasion = (1 - $$\prod_{i=1}^{n}$$(1 - Evasion i )) × Total Blind

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

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

Visual Feedback
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.

Stacking
Calculating the total Evade Chance of a unit involves using Evasion Sources, Blind Debuff Multiplier and the Uphill Miss Chance.

Multiple sources of evasion stack diminishingly with each other, while sources of blind effects stack additively with each other and multiplicatively with evasion. The uphill miss chance stacks multiplicatively with evasion and blind. While the actual chance to evade is diminishing, each source of evasion increases effective HP against physical attacks more than the last due to evasion's exponential nature. The chances of all sources of evasion and blind are determined by pseudo-random distribution.

Evade Chance ( $$P(e)$$ ) and Final Evasion Chance ( $$\sum e$$ ) is defined as
 * $$P(e) = 1 - \prod_{i=1}^n (1-e_{i}) \times e_{bMu} \times e_{up}$$


 * $$\sum e = P(e) \times (1 - \sum ac)$$

With  being the Evasion Sources,   the Blind Debuff Multiplier and   the Uphill Miss Chance.

Accuracy ( $$ac$$ ) and Final Hit Chance ( $$\sum ac$$ ) is defined as


 * $$P(ac) = 1 - \prod_{i=1}^n (1-ac_{i})$$


 * $$\sum ac = 1 - \sum e \times \big(1 - P(ac)\big)$$

With  being the Accuracy Sources.

A more concrete way of thinking about evasion stacking is that for an attack to bypass an evasion stack and hit, the attack should bypass each source of evasion in sequence. Only if all sources of evasion fail, is the attack able to deal damage.

There are currently a few abilities that directly sets a unit's evasion to 100%, e.g. and.

Examples

 * Example 1a
 * 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:


 * Total evasion chance
 * = [1 - (1 - ) × (1 - )] × [1 - ( +  )]


 * Incoming attacks hit chance
 * = 1 -


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

Items
The following items grants the wielder an evasion bonus.

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

Blind Debuff Multiplier is defined as


 * $$e_{bMu} = 1 - \sum \text{min} (e_{b})$$

With  being the sources of Blind.

True Strike
True Strike prevents the unit's attacks from missing, negating evasion, blindness and the % uphill miss chance for ranged units. It also prevents melee attacks from missing when the target moves more than  range away before the attack. Although unable to miss, attack projectiles of a ranged units with True Strike can still be disjointed. True Strike does not work when attacking buildings. However, it works against any other unit, including wards and allied units.

Accuracy
Accuracy is a mechanic similar to True Strike. Accuracy is applied as a debuff on the target.

There are two definitions of Accuracy in the game:
 * First Definition:
 * True Strike's counterpart — While True Strike prevents a unit from missing any of its outgoing attacks, Accuracy prevents a unit from being missed by any incoming attack.


 * Second Definition:
 * Chance-based True Strike — Just like proc chances for abilities, in this definition, attacks gain a chance to ignore evasion and blind effects.

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