D2library

<< FAQtoids English Home

Helpless

Hit Recovery

According to common belief loss of a certain value of maximum life * or suffering a stunning attack causes Hit Recovery to an unit. This plays a special animation called obviously Get Hit animation with a given duration, The Hit Recovery time. The 'Faster Hit Recovery' item property will shorten that duration. Similar to all time-consumpting mechanisms duration is measured in Frames, a Frame lasts 1/25 second. You may also read 'tick' instead of 'frame' sometimes.
Many creatures in Sanctuary have individual durations for Hit Recovery assigned, but some don't need to go into Hit Recovery. The base duration is dependend on kind of unit, but only of importance to player characters and hirelings, since you can't prolong or shorten other unit's Get Hit animation. Items granting Faster Hit Recovery - FHR - are listed at Atair's d2wissen. All units which may wear such items will benefit from FHR. Formular derivation follows in a paragraph below.
Shape-shifted forms like Undead Fetish caused by triggering delirium state or Vampire caused by wearing full Trang Oul set will use those forms' durations. Some threads indicate this is always the case, so, say, a Paladin shifting to Werebear or a Barbarian shifting to Werewolf will be subject to wereform's tables, not table of own class anymore.

* In fact there's some more to it, the commonly known 1/12 life loss rule is 'lying for children'; it gives an approximation, but is not true. 1/12 may have been valid pre1.10, since 1.1x the common value is 1/16, but especially some ranged attacks will even use 1/8. The Evaluation is more complicated and will be discussed later on in this FAQtoid; at the very end you'll find some related listings.
For more scary technical details see this thread by Nefarius at the Phrozen Keep and GetHit mode trigger function by Myrdinn at the Basin.

Some effects, namely almost all fire on ground originating from skills, won't trigger a full Hit Recovery, but they'll trigger the dedicated Get Hit sound. This makes ingame surveys of Hit Recovery very unreliable. Plus playing the sound may cause a kind of mini-lag especially on unperformant hardware, or network connections.
Still a mistery are fire on ground objects, like the pentagrams in Act1 dungeons. They're able to cause Hit Recovery, but I can't elaborate on this due to nonexistence of wisdom.


the evaluation of the Hit Recovery trigger

Thanks to Nefarius and Myrdinn there are the two earlier mentioned independent analysisses of assembly to be found about the conditions needed to trigger Hit Recovery (or short 'GetHit'). This will happen in chronological order:

  1. damage is applied
  2. if damage causes death of the target unit there'll be no further evaluation of GetHit
  3. if target unit is frozen there'll be no further evaluation of GetHit
  4. if applied damage is poison only there'll be no further evaluation of GetHit
  5. if applied damage is smaller than 1 (aka 256 bites) there'll be no further evaluation of GetHit **
  6. get MaxLife, maximum life of target unit
  7. get divisor (the value which was believed to be 1/12) ***
  8. get GetHitTriggerNumber via GetHitTriggerNumber = MaxLife / divisor
  9. then the applied damage counts in in several steps
    • if damage is smaller than GetHitTriggerNumber, there'll be no further evaluation of GetHit
    • if damage is smaller than GetHitTriggerNumber * 2, GetHit evaluation will continue with 50% chance (rnd {0, 1} = 0 Exit, otherwise continue to next step)
    • if last check was successful, or damage is smaller than GetHitTriggerNumber * 4, Hit Recovery will occur with 75% Chance (rnd {0, 1, 2, 3} = 0 Exit, otherwise Hit Recovery will happen)
    • if damage is bigger than GetHitTriggerNumber * 4, Hit Recovery will happen
  10. if target unit is no subject to Hit Recovery at all, Hit Recovery will be skipped (yup, this check is done at the very end :-P )

** ingame calculations of damage and life are always multiplied with 256 to get some extra precision, since the engine can only do integers; thus 1 point equals 256 'bites', the result is then again divided by 256, and truncated

*** the default divisor is 16, sometimes 8 is used; see the listings at the very end of this FAQtoid

To give an example let's just assume a MaxLife of 1600 and an attack with the standard divisor of 16.
GetHitTriggerNumber = MaxLife / divisor -> 1600 / 16 -> 100

So to be sure GetHit is triggered in this example, life loss must be 1/4 of MaxLife. 1/16 of MaxLife lost will only have a probability of 37,5% to cause GetHit, and values between 1/8 and 1/4 of MaxLife will have a probability of 75% to cause GetHit.

HitClasses

HitClasses are a realtime concept to control multimedia effects like sounds and overlays. There's some evidence they're used for GetHit evaluation as well.
To current knowledge melee attacks will always use default GetHitTriggerNumber = 16. Exceptions are the skills below which will do stun or knockback, because their functions override the default.
Missile attacks' (no matter if standard attack or skill) missiles will use the missile's HitClass to evaluate GetHit from the missile (I never wrote up to four times the word missile in a single sentence before - eek, I did it one more time).
Monsters' attacks behaviour should be the same.


formular derivation of Hit Recovery duration

Firstly effective Hit Recovery speed is calculated. This calculation is subject to a diminishing returns formula.

eFHR = [FHR * 120 / (FHR + 120)]

eFHR: effective Hit Recovery FHR: Faster Hit Recovery granted by items [ ]: Floor Function

Further there is a class-specific constant GetHitbase needed in the main formula.
Beware: this does not resemble the frame count needed by a character without FHR granted by items!

ClassGetHitbase
Amazon6
Assassin5
Barbarian5
Druid
Werebear
5
Druid
Werewolf
4
Druid
human
7
Necromancer7
Paladin5
Sorceress8
hirelings
Rogue6
Town Guard8
Iron Wolf9
[Barbarian5]

The value of vanim is commonly 256; with those exceptions.

ClassWeaponvanim
Druid
Werebear
all184
Druid
human
one-handed
swinging weapons
248
Paladinspears
two-handed staves
two-handed axes
two-handed hammers
poles
192

Hit Recovery duration in frames is now calculated this way:

HRf = {256 * GetHitbase / [vanim * (50 + EFHR) / 100]} - 1

HRf: Hit Recovery duration in frames GetHitbase: class-specific constant vanim: animation velocity aka AnimSpeed eFHR: effective Hit Recovery gained from first formula [ ]: Floor Function { }: Ceiling Function

see also:

Stun

Some skills cause a 'stun' effect. Common units are unable to do anything during stun duration, player characters and those monsters which can't suffer stun (namely Bosses and Act Bosses) will be forced into Hit Recovery, and will be forced into this animation again with each successful hit during that duration irregardless of caused damage. Exceptions, again, are those units which are no subject to Hit Recovery, say, Diablo. See again the listings at the very end of this FAQtoid.
Stun is delivered by

Stun is also a kind of damage of its own, which can be assigned to individual monsters in El[1-3]ff columns of MonStats.txt.
Thus those guys may stun you

The Act5 Barbarian hireling may use the Barbarian skill Stun, so he belongs here, too.

Tose guys may use Smite


Knockback

Other skills and some items cause Knockback (KB). The KB animation uses some parts of the GetHit animation, but KB doesn't trigger Hit Recovery automatically.
Skills which will do Knockback

Those guys may use Charge

Those guys may apply Knockback otherwise

Some units won't suffer the Knockback effect. Obviously the immobile ones, but here are some more. Full list is at the very end of this FAQtoid.


Credits


Appendix

units which won't suffer GetHit

'objectish' immobile units, which will attack or spawn others
mobile units
allied units

units which won't suffer Knockback

'objectish' immobile units
mobile units
allied units

Players' skills which spawn missiles which can trigger Hit Recovery

Monsters, whose missiles may cause Hit Recovery

objects which will most probably cause Hit Recovery when run into


Contact me via E-Mail, if you like.


Valid HTML 4.01 Transitional
Valid CSS 2.0

last update 22III09
© by librarian

<< FAQtoids English Home

D2library