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 can be defined as: Total Evasion = 1 - $$\prod_{i=1}^{n}$$(1 - Evasion i )

Multiple sources of evasion stack diminishingly with each other, while blind sources stack additively with itself and multiplicatively with evasion. Blind sources do not directly increase the attacked unit's evasion value, instead, they increase the theoretical evasion value of the attacked unit. All evasion and blind sources are determined by pseudo-random distribution.

Blind Multiplier = 1 - Total Blind i

Accuracy sources also do not directly increase the attacked unit's evasion value. For calculation purposes, the accuracy multiplier can be considered as an evasion source as well. In general, accuracy does not need to be procced to negate evasion.

Accuracy Multiplier = 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 sequence. Only if all sources of evasion fail can the attack deal damage.

Theoritical Evasion = Total Evasion × Blind Multiplier × Accuracy Multiplier

Incoming Attacks Hit Chance = 1 - Theoritical Evasion

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

 * 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:


 * 's theoretical 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 's incoming attacks.


 * Example 3a
 * Accuracy Calculations
 * An enemy is now affected by   and an unknown 15% accuracy source. What is her current accuracy chance against evasion?


 * Accuracy sources:
 * Unknown source:
 * Unknown source:


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


 * has an accuracy multiplier of against all theoretical evasion sources.


 * Example 3b
 * Evasion interactions with Accuracy
 * An enemy of Example 3a now attacks  from the previous example.
 * What are the chances of incoming attacks hitting ?


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


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


 * Although 's total evasion did not change, the accuracy has reduces 's theoretical evasion value to %. Therefore, she has % chance of getting hit by 's incoming attacks.


 * 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 theoretical evasion calculation?


 * 's total evasion chance =


 * Accuracy Multiplier
 * = 1 × (1 - 1)
 * = 0


 * Incoming attacks to hit chance:
 * = 1 - × 0
 * = 1


 * 100% accuracy reduces 's theoretical evasion value to none. She has a 100% chance of getting hit by incoming attacks regardless of her current evasion value.
 * 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.

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 Blind Multiplier = 1 - Total Blind i





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.

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.

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. In general, accuracy does not need to be procced to negate evasion.

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

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