Chance to Hit


Contents
To-Hit Formula
Attack Rating
Defense
Special Modifiers
Refer to the Diablo II Strategy Compendium and the (Amazon) Basin Wiki - Diablo II Technical Information.
Further details in librarian's FAQtoids: http://www.mannm.org/d2library/faqtoids/cth_eng.html.To-Hit FormulaA large group of physically delivered attacks in Diablo II depend on Attack Rating (AR) in order to hit, including, but not limited to missile attacks, kicks and charge-up skills, Concentrate, Frenzy, Whirlwind, Zeal, and Charge. Smite and Guided Arrow are exceptions in that they both bypass the hit check.
The attacker's level and AR are checked against the defender's level and Defense to determine if a hit is scored,
Code
Chance to Hit = 2 * atlvl / (atlvl + dflvl) * AR / (AR + Defense) ; multiply by 100 to get CtH in %
The chance to hit has a lower cap of 5 % and an upper cap of 95 %. Thus, even if the formula returns CtH > 95 %, the chance to hit will be 95 %. Similarly, CtH < 5 % will produce a 5 % chance to hit.
Notice: the important figures are the
ratios (attacker level to defender level and AR to Defense), not either individual value by itself. Whenever the hit check is successful, blocking is checked next, and finally the Amazon evasive skills. Details on blocking may be found
here.
Negative AR or DefenseThrough AR or Defense reduction, it may happen that either one is forced below 0.
- If AR < 0, -AR is added to both AR and Defense before applying the to-Hit formula. This modification brings AR to zero, resulting in CtH = 0, which is modified to 5 % by the lower cap.
- If Defense < 0, -Defense is added to both AR and Defense before applying the to-Hit formula. This modification brings Defense to zero, resulting in CtH = 2 * atlvl / (atlvl + dflvl).
- If both AR and Defense = 0 or get modified to 0, the AR / (AR + Defense) component will be ignored. In this case, too, the chance to hit is calculated as CtH = 2 * atlvl / (atlvl + dflvl).
Running / WalkingWhen a character is running, the to-Hit formula is skipped and attacks hit automatically (unless blocked, out of range etc.). Defense has an effect only if the character is walking or standing still. Librarian notes that in-fight moving doesn't count as running, even when run mode is activated. This applies to attacks such as Whirlwind, Charge, Leap, Leap Attack, and Dragon Flight, as well as to Teleport.
Resources for determining CtH,
Attack RatingBase Attack RatingFor characters, this is calculated as follows,
Code
Base AR = (Dexterity * 5) - 35 + ClassBonus
where ClassBonus is given by the following table,
Code
Class ClassBonus
Amazon +5
Assassin +15
Barbarian +20
Necromancer -10
Paladin +20
Sorceress -15
Druid +5
For mercenaries (hirelings),
Code
Base AR = Dexterity * 5
Base AR for monsters is listed in the mpq files. While I do not guarantee that the following resources are 100 % accurate,
at least the values should be of approximately the right size.
Attack Rating (Final)Base AR and any AR bonuses from equipment, charms, and skills are calculated together,
Code
Attack Rating = [(Base AR + Direct AR) * (1 + %AR/100)]
where [ ] indicates rounding down.
Direct AR refers to straight AR bonuses (
+X to Attack Rating), whereas % AR includes
Y % bonus to Attack Rating as well as percentage bonuses from skills.
Attack Rating Bugs- Power Strike ignores the +% AR bonus from Skills.txt. Impressive damage ... oh wait, the skill doesn't hit shit consistently !
- Missile skills that are meant to add +% AR bonuses do not add their bonus to the missiles, despite indicating otherwise in-game (e.g. Bow and Crossbow Skills, Double Throw).
Hence, one should rely on the values for the Normal Attack instead. - Penetrate and Blessed Aim use the same aurastate. As a result, an allied Blessed Aim may cancel out your Amazon's Penetrate +% AR bonus. Yay !
Refer to the "
v1.10-v1.11b Bugs Collection" by Nefarius @ the Phrozen Keep (Google !) for dozens of other magnificent
features, carelessly implemented by Blizzard. Gloam Bug, anyone ?
DefenseBase DefenseFor characters and mercenaries,
Code
Base Defense = [Dexterity / 4]
For monsters, browse the links from the previous section.
Armor DefenseCirclets, Helms, Body Armor, Shields, Gloves, Belts, and Boots. Calculated as follows,
Code
(1) Socketed in the Horadric Cube
Armor Defense = [[(Base Armor Defense) * (Ethereality Multiplier)] * (Ethereality Multiplier)]
(2) Spawning without +% ED or upgraded rare/unique
Armor Defense = [[(Base Armor Defense) * (Ethereality Multiplier)] * (1 + %ED/100)] + (+Defense)
(3) Spawning with +% Enhanced Defense
Armor Defense = [[(Maximum Base Armor Defense + 1) * (Ethereality Multiplier)] * (1 + %ED/100)] + (+Defense)
where Ethereality Multiplier is 1.5 if the item is ethereal, and 1 otherwise. When upgrading
rare or
unique armor, the new Base Armor Defense is rolled randomly. More on upgrading
here.
Defense (Final)Base Defense, Armor Defense, and any bonuses from the remaining equipment, charms, and skills are calculated together,
Code
Defense = [(Base Defense + Armor Defense + Direct Defense) * (1 + %Defense/100)]
Direct Defense (
+X Defense) and +% Defense bonuses in this case are those not increasing Armor Defense, such as Amulets, Rings, and Charms. Furthermore, +% Defense includes all percentage defense bonuses from skills, e.g. Cloak of Shadows, Shout, Iron Skin, Frozen Armor, Defiance, and Holy Shield.
Certain skills are capable of reducing enemy Attack Rating or Defense,
- Inner Sight
Applies -X to target's Base Defense. Depending on the target, this may be better or worse than affecting the total. Generally rather effective vs monsters. - Cloak of Shadows
Applies +% Defense to the caster and -% Defense to the target. Stacks with other skill sources of +/-% Defense, except Battle Cry. - Taunt
Applies -% AR and -% Defense to the target. - Battle Cry
Applies -% Defense to the target. Stacks with other sources of +/- % Defense, except CoS. - Conviction
Applies -% Defense to the target. Stacks with other sources of +/- % Defense.
Special ModifiersThese take effect when determining the chance to hit, hence why they weren't included in the previous section. They affect Defense in the to-Hit formula, not intermediate results.
- Ignore Target's Defense
Treats the defender's Defense as 0 in determining chance to hit, effectively resulting in CtH = 2 * atlvl / (atlvl + dflvl). ITD works against regular monsters only. - -X % Target Defense
Treats the defender's Defense as Defense - [Defense * X/100]. Works at half the displayed value vs players, mercenaries, and bosses. - -X to Monster Defense per hit
Each successful hit reduces monster Defense by X.