Difference between revisions of "Evasion"

From CrawlWiki
Jump to: navigation, search
m (Dodging: update to dodge formula, correction given by a tavern member)
m (+CBA and bump)
 
(23 intermediate revisions by 8 users not shown)
Line 1: Line 1:
{{version013}}  
+
{{version031}}  
 
''This page is about the character trait. For the brand, see the article [[Evasion (brand)]]''
 
''This page is about the character trait. For the brand, see the article [[Evasion (brand)]]''
  
'''Evasion''' (often abbreviated to '''EV''') is a number that measures the ability of a character or of a [[monster]] to avoid melee attacks, ranged attacks, and magical beam attacks. When an attack is resolved, a target's current EV is rolled and compared to the attack's [[to-hit]] roll, factoring in any relevant situational modifiers. Only if the to-hit roll matches or beats the EV roll does the attack succeed.
+
'''Evasion''' (often abbreviated to '''EV''') is a number that measures the ability of a character or of a [[monster]] to avoid melee, ranged, and magical beam attacks. When an attack is resolved, a target's current EV is rolled and compared to the attack's [[to-hit]] roll, factoring in any relevant situational modifiers. Only if the to-hit roll matches or beats the EV roll does the attack succeed.
 
 
== Player EV ==
 
  
 +
==Player EV==
 
The calculation to determine a character's total EV is complex and factors in many different skills and attributes.
 
The calculation to determine a character's total EV is complex and factors in many different skills and attributes.
  
 
===Base EV===
 
===Base EV===
 
 
The player's base EV is calculated as follows:
 
The player's base EV is calculated as follows:
 
   10 + size_factor
 
   10 + size_factor
  
"Size factor" is the number of steps away from "medium" (i.e. [[Human]]) size. Larger [[species]] ([[Troll]]s, [[Ogre]]s, [[Centaur]]s, [[Naga]]s) have a negative size factor while smaller species ([[Kobold]]s, [[Halfling]]s, [[Spriggan]]s) have a positive size factor.
+
"Size factor" is determined by the [[size]] of your [[species]].  
 +
 
 
{|class="prettytable"
 
{|class="prettytable"
! Species !! Size factor
+
! Size !! Species !! Size factor
 
|-
 
|-
| [[Troll]], [[Ogre]], [[Centaur]], [[Naga]] || -2
+
| Little || [[Spriggan]], [[Felid]] || +4
 
|-
 
|-
| [[Kobold]], [[Halfling]] || +2
+
| Small || [[Kobold]] || +2
 
|-
 
|-
| [[Spriggan]], [[Felid]] || +4
+
| Medium || All other species || 0
 
|-
 
|-
| Otherwise || 0
+
| Large<br>Large (normal torso) || [[Troll]], [[Ogre]]<br>[[Armataur]], [[Naga]] || -2
 
|}
 
|}
  
 
Some transformations override the racial size factor:
 
Some transformations override the racial size factor:
 
{|class="prettytable"
 
{|class="prettytable"
! Form !! Size factor
+
! Size !! Form !! Size factor
 
|-
 
|-
| [[Spider Form]], [[Bat Form]], [[Porcupine Form]], [[Wisp Form]], [[Fungus Form]] || +4
+
| Tiny || [[Spider Form]], [[Bat Form]]<br>[[Wisp Form]], [[Fungus Form]] || +4
 
|-
 
|-
| [[Pig Form]] || +2
+
| Small || [[Pig Form]] || +2
 
|-
 
|-
| [[Ice Form]] || -2
+
| Large || [[Serpent Form]] || -2
 
|-
 
|-
| [[Dragon Form]], [[Tree Form]] || -8
+
| Giant || [[Dragon Form]] || -6
 
|-
 
|-
 
|}
 
|}
  
However, if you are paralysed or your [[dexterity]] is below 1, your EV is reduced to:
+
However, if you are paralysed, petrified, in [[tree form]], or your [[dexterity]] is 0 or lower, your EV is reduced to:
  
   2 + size_factor/2 + [[Phase Shift]] bonus + ([[repulsion field]] bonus)
+
   2 + size_factor/2
  
 
In this case, minimum EV is 1. No other factors apply.
 
In this case, minimum EV is 1. No other factors apply.
  
 
=== Dodging ===
 
=== Dodging ===
 
 
The [[Dodging]] skill provides a bonus to your EV as follows:
 
The [[Dodging]] skill provides a bonus to your EV as follows:
  
  dodge_bonus = (7 + Dodging × ev_Dex) / (20 - size)
+
  dodge_bonus = (8 + Dodging × Dex × 0.8) / (20 - size)
  ABAEVP= body_armour_encumbrance_rating - body_armour_encumbrance_rating*size_factor/8
+
  armor_penalty = unadjusted_armor_encumberance - 3
  dodge_penalty = max(0, (10*ABAEVP - 30)/str)
+
  if armor_penalty < 0:
  final_dodge_bonus = max(0, dodge_bonus - dodge_penalty)
+
    modifier = 1
 
+
if armor_penalty > 0:
Notes:
+
    if armor_penalty >= Str:
*"[[ABAEVP]]" stands for Adjusted Body Armour EVasion Penalty.
+
        modifier = Str / (armor_penalty * 2)
*Dexterity is passed through a stepdown function, that compresses any value above 24.
+
    if armor_penalty < Str:
 +
        modifier = 1 - armor_penalty / (Str * 2)
 +
  final_dodge_bonus = dodge_bonus * modifier
  
 
=== Armour and shield EV penalties ===
 
=== Armour and shield EV penalties ===
 +
After adding base EV and Dodging's bonus together, the direct EV penalties from armour and shields are then subtracted. Each armour type listed below has an "encumbrance rating", which is converted to an EV penalty (where each type has a different formula).
  
After adding base EV and Dodging's bonus together, the EV penalties from armour and shields are then subtracted.
+
*[[Barding]]: -2 EV
 
+
*[[Body armour]]: <code>-1/225 * encumbrance^2 * (90 - 2 × armour_skill) / (str + 3)</code>
The armour penalty is equal to your [[AEVP]]. Only body armour and bardings (both for Nagas and Centaurs) have any penalties. "AEVP" (which stands for Adjusted EVasion Penalty for armour) is a complex value based on your Strength, your Armour skill, and the Evasion penalties of the armour pieces you wear.
+
*[[Shield]]: <code>-2/5 * encumbrance^2 / (str + 5) * ((27 - shield_skill) / 27)</code>
 
 
AEVP = barding_encumbrance_rating/3 + 2 × body_armour_encumbrance_rating^2 × (45 - armour_skill) / (5 × (STR + 3) × 45)
 
 
 
For shields, a value called "ASP" (which stands for Adjusted Shields Penalty) is calculated based on the cumbersomeness of your shield (less for bucklers, more for large shields), your Shields skill, and your species's size.
 
ASP = max(0, base_penalty  - shield_skill/(5 + size_factor))
 
 
 
==Stepdown==
 
Before adding any magical bonus, a stepdown function is applied to your evasion. This function reduces you evasion a bit if it is more than 30.
 
EV = (EV<30? EV : 10 + 20*log(1 + (EV-10)/20)/log(2))
 
[[Image:evasion_stepdown.png]]
 
 
 
=== Magic ===
 
  
Various magical effects can grant bonuses to EV. These are added directly to your EV total after the above calculations.
+
===Modifiers===
 
+
Various effects can modify EV. These are added directly to your EV total after the above calculations.
* [[Potion of agility]]: +5 EV.
+
*If you have the [[vertigo]] effect, a -5 modifier to your EV is applied.
* Weapons with the [[evasion_(brand)|evasion]] ego: +5 EV.
+
*[[ring of evasion|Rings of evasion]] provide their exact bonus or penalty (usually +5) to your EV.
* [[Demonspawn_mutations#Icy_Blue_Scales|Icy blue scales]] or [[Demonspawn_mutations#Molten Scales|molten scales]] mutations: -1 EV.
+
*An [[amulet of the acrobat]] provides +15 EV if your turn was used moving or waiting.
* [[Jiyva_mutations#Gelatinous_Body|Gelatinous body]] mutation: +1 at level 2, +2 at level 3.
+
*Some [[list of unrands|unrand]]s provide a bonus or penalty to your EV, as well as randart rings with a ring of evasion as their base type.
* [[ring of evasion|Rings of evasion]] provide their exact bonus or penalty to your EV.
+
*[[Jiyva_mutations#Gelatinous_Body|Gelatinous body]] mutation: +1 at level 2, +2 at level 3.
* [[List of unrands|Some unrand]]s provide a bonus or penalty to your EV (as well as randart rings with a ring of EV as the base type).
+
*The [[Repulsion Field]] [[mutation]] grants an EV bonus.
* The [[Statue Form]] spell has a -10 EV penalty.
+
*[[Ru]] worshippers who sacrifice health to reduce EV are penalised by -5 per sacrifice.
* The [[Phase Shift]] spell grants a +8 EV bonus while active.
+
*Flying [[Tengu]] get a +4 bonus to EV.
* The [[Repulsion Field]] [[mutation]] grants an EV bonus even when you are paralysed.
+
*Being [[web|entangled]] or [[petrify]]ing halves your evasion.
* Being [[web|entangled]] or [[petrify|petrifying]] halves your evasion.
+
*Being affected by [[Jorgrun]]'s or a [[shambling mangrove]]'s grasping roots multiplies evasion by 2/3.
 
+
*Swimming [[Merfolk]] get a 25% bonus to EV (minimum +2). This is applied after all other modifiers.<ref>{{source ref|0.31.0|player.cc|2076}}</ref>
=== Other racial modifiers ===
 
 
 
After all of the above factors have been considered:
 
 
 
* Swimming [[Merfolk]] get a 25% bonus to EV (minimum +2, maximum +9)
 
* Flying [[Tengu]] get a 20% bonus to EV (minimum +1, maximum +9)
 
 
 
=== Final situational modifiers ===
 
  
 +
===Final situational modifiers===
 
Against melee attacks:
 
Against melee attacks:
* If are being [[constricted]], you suffer a -3 EV penalty.
+
*If are being [[constricted]], you suffer a -3 EV penalty.
* If you cannot see your attacker (i.e. they are [[invisible]] and you cannot [[see invisible]]), you suffer a -10 EV penalty against that attacker.
+
*If you cannot see your attacker (i.e. they are [[invisible]] and you cannot [[see invisible]]), you suffer a -10 EV penalty against that attacker.
* If you are "delayed" (i.e. you are busy carrying out a multi-turn action), you suffer a -5 EV penalty.
+
*If you are going down [[stairs]] while being attacked, you suffer a -5 EV penalty.
 
 
== Monster EV ==
 
 
 
A monster's EV is a fixed number dependent on monster type. Note that some monsters may wear equipment that increases or reduces their EV.
 
  
== To-hit versus EV ==
+
==Monster EV==
 +
A monster's base EV is a fixed number dependent on monster type. This base can be modified by armour, jewellery, and various status effects.
  
 +
==To-hit versus EV==
 
If an attack's [[to-hit]] number is 1500 (the magic number AUTOMATIC_HIT) or greater (e.g. [[Magic Dart]]), it automatically hits.  
 
If an attack's [[to-hit]] number is 1500 (the magic number AUTOMATIC_HIT) or greater (e.g. [[Magic Dart]]), it automatically hits.  
  
 
Otherwise, the following procedure is used.
 
Otherwise, the following procedure is used.
* 2.5% of the time, the attack misses regardless of the attack's to-hit or the defender's EV.
+
*2.5% of the time, the attack misses regardless of the attack's to-hit or the defender's EV.
* 2.5% of the time, the attack hits regardless of the attack's to-hit or the defender's EV.
+
*2.5% of the time, the attack hits regardless of the attack's to-hit or the defender's EV.
* A uniformly distributed random number between zero and the to-hit number (inclusive) is generated.
+
*A uniformly distributed random number between zero and the to-hit number (inclusive) is generated.
* Two uniformly distributed random numbers between zero and ((2 * (target EV)) - 1) inclusive are averaged together.
+
*Two uniformly distributed random numbers between zero and ((2 * (target EV)) - 1) inclusive are averaged together.
* If the to-hit roll is greater than or equal to the EV roll, the attack hits. Otherwise, it misses.
+
*If the to-hit roll is greater than or equal to the EV roll, the attack hits. Otherwise, it misses.
 +
 
 +
==History==
 +
{{CBA|0.32|multipliers to player EV will be applied after all permanent modifiers, but before all temporary modifiers. In addition, effects like paralysis and clumsy will no longer raise EV from very low values.}}
 +
*Prior to [[0.27]], a stepdown was applied for EV values >30; <code>adj_EV = 10 + 20 * log(1 + (EV-10)/20log2)</code>. [[Dexterity]] also had a stepdown when calculating the dodging bonus.
 +
*Prior to [[0.25]], a [[potion of agility]] was an easy way to increase EV.
 +
*Prior to [[0.19]], certain ranged weapons could be branded with [[evasion_(brand)|Evasion]], granting a +5 EV bonus.
 +
*Prior to [[0.17]], the evasion bonus for flying Tengu and swimming Merfolk was capped at +9 EV.
  
[[Image:evasion.png|thumb|center|400px]]
+
==References==
 +
<references />
  
[[Category:Stats]] [[Category:Game mechanics]]
+
[[Category:Stats]]
[[Category:Crystal Ball Articles]] <!-- grasping roots -->
+
[[Category:Game mechanics]]

Latest revision as of 01:32, 27 February 2024

Version 0.31: This article is up to date for the latest stable release of Dungeon Crawl Stone Soup.

This page is about the character trait. For the brand, see the article Evasion (brand)

Evasion (often abbreviated to EV) is a number that measures the ability of a character or of a monster to avoid melee, ranged, and magical beam attacks. When an attack is resolved, a target's current EV is rolled and compared to the attack's to-hit roll, factoring in any relevant situational modifiers. Only if the to-hit roll matches or beats the EV roll does the attack succeed.

Player EV

The calculation to determine a character's total EV is complex and factors in many different skills and attributes.

Base EV

The player's base EV is calculated as follows:

 10 + size_factor

"Size factor" is determined by the size of your species.

Size Species Size factor
Little Spriggan, Felid +4
Small Kobold +2
Medium All other species 0
Large
Large (normal torso)
Troll, Ogre
Armataur, Naga
-2

Some transformations override the racial size factor:

Size Form Size factor
Tiny Spider Form, Bat Form
Wisp Form, Fungus Form
+4
Small Pig Form +2
Large Serpent Form -2
Giant Dragon Form -6

However, if you are paralysed, petrified, in tree form, or your dexterity is 0 or lower, your EV is reduced to:

 2 + size_factor/2

In this case, minimum EV is 1. No other factors apply.

Dodging

The Dodging skill provides a bonus to your EV as follows:

dodge_bonus = (8 + Dodging × Dex × 0.8) / (20 - size)
armor_penalty = unadjusted_armor_encumberance - 3
if armor_penalty < 0:
    modifier = 1
if armor_penalty > 0:
    if armor_penalty >= Str:
        modifier = Str / (armor_penalty * 2)
    if armor_penalty < Str:
        modifier = 1 - armor_penalty / (Str * 2)
final_dodge_bonus = dodge_bonus * modifier

Armour and shield EV penalties

After adding base EV and Dodging's bonus together, the direct EV penalties from armour and shields are then subtracted. Each armour type listed below has an "encumbrance rating", which is converted to an EV penalty (where each type has a different formula).

  • Barding: -2 EV
  • Body armour: -1/225 * encumbrance^2 * (90 - 2 × armour_skill) / (str + 3)
  • Shield: -2/5 * encumbrance^2 / (str + 5) * ((27 - shield_skill) / 27)

Modifiers

Various effects can modify EV. These are added directly to your EV total after the above calculations.

  • If you have the vertigo effect, a -5 modifier to your EV is applied.
  • Rings of evasion provide their exact bonus or penalty (usually +5) to your EV.
  • An amulet of the acrobat provides +15 EV if your turn was used moving or waiting.
  • Some unrands provide a bonus or penalty to your EV, as well as randart rings with a ring of evasion as their base type.
  • Gelatinous body mutation: +1 at level 2, +2 at level 3.
  • The Repulsion Field mutation grants an EV bonus.
  • Ru worshippers who sacrifice health to reduce EV are penalised by -5 per sacrifice.
  • Flying Tengu get a +4 bonus to EV.
  • Being entangled or petrifying halves your evasion.
  • Being affected by Jorgrun's or a shambling mangrove's grasping roots multiplies evasion by 2/3.
  • Swimming Merfolk get a 25% bonus to EV (minimum +2). This is applied after all other modifiers.[1]

Final situational modifiers

Against melee attacks:

  • If are being constricted, you suffer a -3 EV penalty.
  • If you cannot see your attacker (i.e. they are invisible and you cannot see invisible), you suffer a -10 EV penalty against that attacker.
  • If you are going down stairs while being attacked, you suffer a -5 EV penalty.

Monster EV

A monster's base EV is a fixed number dependent on monster type. This base can be modified by armour, jewellery, and various status effects.

To-hit versus EV

If an attack's to-hit number is 1500 (the magic number AUTOMATIC_HIT) or greater (e.g. Magic Dart), it automatically hits.

Otherwise, the following procedure is used.

  • 2.5% of the time, the attack misses regardless of the attack's to-hit or the defender's EV.
  • 2.5% of the time, the attack hits regardless of the attack's to-hit or the defender's EV.
  • A uniformly distributed random number between zero and the to-hit number (inclusive) is generated.
  • Two uniformly distributed random numbers between zero and ((2 * (target EV)) - 1) inclusive are averaged together.
  • If the to-hit roll is greater than or equal to the EV roll, the attack hits. Otherwise, it misses.

History

  • In 0.32, multipliers to player EV will be applied after all permanent modifiers, but before all temporary modifiers. In addition, effects like paralysis and clumsy will no longer raise EV from very low values.
  • Prior to 0.27, a stepdown was applied for EV values >30; adj_EV = 10 + 20 * log(1 + (EV-10)/20log2). Dexterity also had a stepdown when calculating the dodging bonus.
  • Prior to 0.25, a potion of agility was an easy way to increase EV.
  • Prior to 0.19, certain ranged weapons could be branded with Evasion, granting a +5 EV bonus.
  • Prior to 0.17, the evasion bonus for flying Tengu and swimming Merfolk was capped at +9 EV.

References

  1. player.cc:2076 (0.31.0)