1. Apply PvP modifications.
Damage is reduced to: 17% for Player v
Player Hireling v Player Minion v Player (player minion
that is) 25% for: Hireling v Hireling 50%/35%/25%
(normal/night/hell) for: Hireling v some kinds of bosses
(not sure exactly which ones). +200% for Some kind of
bosses (not sure exactly which ones) v hirelings +400%
for Some kind of bosses (not sure exactly which ones) v
minions
2. Handle target effects (I think). I would
assume, this is where stuff like Bone/Cyclone Armor goes since
I have not found it in other places
3. If target has
"can't be frozen stat", set chill and freeze duration to
zero
4. If target has "half freeze duration", set chill
and freeze duration to half the value
5. If target has
a poison shrine state, set poison duration to zero
6.
If target has a fire shrine state, set burning duration to
zero
7. Apply -damage to physical damage and
-magicdamage to fire, lightning, cold and magic damage (there
seem to be some cases, or some special monsters for which this
step is skiped and also its resistance later will never go
below 0, not sure exactly though)
8. Apply
resistance Take base resistance of target. Base resistance
include the total of all resistance from items and skills the
target has plus any modification from outside skills such
as AmpDamage and LowerResistance.
Subtract any "lower
resistance" or "pierce" the attacker might have. This include
Cold Mastery. Again, any cold resistance lowering/piercing
will also lower the cold resistance applied to chill and
freeze duration. If there exists any poison pierce, it
applies to both the damage per frame and duration.
For
a player target, apply the difficulty penalty (-40/-100 in
night/hell). The penalty is half that in classic and in
expansion after the completion of the appropriate quest.
The penalty is applied to all resistances (including poison
duration reduction) except physical and magic
resistance.
Cap the resistance at -100% or at the upper
cap. The upper cap base is 75% (except for phsyical were it is
50%). This upper cap base can be increased to 95% through
+max resistance items for all resistances except physical and
poison length duration (this includes when cold resistance
is applied to chill and freeze duration where the +max cold
resistance would be applied).
If the target is
Undead and the attacker is under the influence of a Sanctuary
aura, the resistance is set to 0% if it is above
0%.
As note above, for some special cases/monsters, the
resistance might be increased to 0% if below 0%. I don't
know anything more about this at the moment
though.
Finally the dammage is modified according to
the final modified resistance value. Note that cold resistance
is applied to chill duration and freeze duration.
9.
Apply absorbtion%. The absorbtion% is caped at 40%.
10.
Apply absorbtion. The absorbtion is caped at whatever ammout
of damage still remain. That is, you can't absorb
more damage than there still remain at this
step.