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.
The calculation to determine a character's total EV is complex and factors in many different skills and attributes.
The player's base EV is calculated as follows:
10 + size_factor
|Medium||All other species||0|
Large (normal torso)
| Troll, Ogre
Some transformations override the racial size factor:
|Tiny|| Spider Form, Bat Form
Wisp Form, Fungus Form
2 + size_factor/2
In this case, minimum EV is 1. No other factors apply.
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)
-2/5 * encumbrance^2 / (str + 5) * ((27 - shield_skill) / 27)
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.
- Being entangled or petrifying halves your evasion.
- Being affected by Jorgrun's or a shambling mangrove's grasping roots multiplies evasion by 2/3.
Other racial modifiers
After all of the above factors have been considered:
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.
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
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.
- 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.
- player.cc:2006 (0.28.0)