d2jsp
Log InRegister
d2jsp Forums > Diablo II > Diablo 2 Discussion > Strategy & Guides > Chance To Hit > Attack, Defense, And Special Modifiers
1236Next
Add Reply New Topic New Poll
Member
Posts: 25,580
Joined: May 20 2006
Gold: 843.00
May 21 2009 06:24am
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 Formula

A 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 Defense
Through 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 / Walking
When 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 Rating

Base Attack Rating
For 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 ? :thumbsup:


Defense

Base Defense
For characters and mercenaries,

Code
Base Defense = [Dexterity / 4]

For monsters, browse the links from the previous section.

Armor Defense
Circlets, 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 Modifiers

These 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.
Member
Posts: 7,630
Joined: Jan 16 2007
Gold: 9.69
May 21 2009 06:27am
like always very deep and correct

thanks for ur good work!
Member
Posts: 13,933
Joined: Apr 30 2007
Gold: 31,282.50
May 21 2009 06:43am
Quote (sexy_guy @ Thu, 21 May 2009, 15:27)
like always very deep and correct

thanks for ur good work!


this.
Banned
Posts: 7,390
Joined: Mar 2 2009
Gold: 8.37
Warn: 20%
May 21 2009 07:21am
why do you bother making all these guides

with no stars you won't get a trusted tag
Banned
Posts: 4,784
Joined: Oct 29 2007
Gold: 0.00
Warn: 40%
May 21 2009 08:49am
Quote (cs_office @ Thu, May 21 2009, 01:21pm)
why do you bother making all these guides

with no stars you won't get a trusted tag


Faelwen doesn't need one.
Member
Posts: 1,935
Joined: Jun 3 2008
Gold: 6.22
May 21 2009 09:14am
Quote (sexy_guy @ Thu, 21 May 2009, 13:27)
like always very deep and correct

thanks for ur good work!
How would you know after 3 minutes?

Member
Posts: 12,028
Joined: Dec 14 2006
Gold: 1,261.00
May 21 2009 01:03pm
Quote (Chlamydia @ Thu, May 21 2009, 04:14pm)
How would you know after 3 minutes?


because he skimmed the text

And faelwen's info is just always correct, no doubting that
Member
Posts: 11,952
Joined: Sep 22 2005
Gold: 2,013.80
May 21 2009 01:08pm
Quote (cs_office @ Thu, May 21 2009, 03:21pm)
why do you bother making all these guides

with no stars you won't get a trusted tag


You don't need starts to get a TT + he isn't doing these for it anyway.


Faelwen, you nooben irl. Always mighty and righty, I'll catch you with an error someday. > : [
Member
Posts: 30,379
Joined: Apr 4 2006
Gold: 5,450.00
May 22 2009 03:14am
hmz, nobody said it so...

tl;dr :p

but once again, nice work ;)
Member
Posts: 4,924
Joined: Dec 21 2007
Gold: 416.00
May 22 2009 03:18am
Quote (Dawn Of Victory @ Fri, 22 May 2009, 10:14)
hmz, nobody said it so...

tl;dr :p

but once again, nice work ;)


This
Go Back To Strategy & Guides Topic List
1236Next
Add Reply New Topic New Poll