6.2 Melee attacks

Here we will only discuss melee attacks; this does not apply to attacks with bows, and is always done to an adjacent target.

6.2.1 Player versus Monster

To Hit

  1. if the target monster is an Illusion Weaver that is currently running away, exit as it is at the moment immune to any attack
  2. if the target monster is Stone Cursed, the attack is an automatic hit, go directly to damage calculations
  3. calculate 50 + Dex/2 + ToHititems + clvl + bonusplayer
  4. in Hellfire, if the player has any item with the "penetrate armor" effect, temporarily reduce Acmonster as appropriate
  5. subtract Acmonster
  6. in Hellfire, if the attack is an adjacent quarter damage attack, subtract 70 - 2·clvl (minimum 30)
  7. if the value calculated is below 5, set it to 5
  8. if the value calculated is above 95, set it to 95
  9. the value now achieved is the final chance to hit (FTH)
  10. a hit is secured if Rnd[100] < FTH

The steps 3-8 above can be summarized to:

FTH = 50 + Dex/2 + ToHititems + clvl + bonusplayer - Acmonster - penaltyquarter damage

Damage

  1. calculate Rnd[maxbase weapon damage - minbase weapon damage + 1] + minbase weapon damage (this is basically a random value within the weapons base damage range)
  2. add +% damage
  3. add +damage
  4. add character damage
  5. if the attacker is a Warrior or Barbarian then double damage if Rnd[100] < clvl (critical hit)
  6. if the monster is undead or an animal, adjust the damage according to the table in chapter 5.1 under monster type, that is, under certain circumstances multiply damage by 1.5 or divide damage by 2
  7. if the monster is a demon, triple the damage if the player is carrying any item with the "+200% damage versus demons" effect
  8. in Hellfire, if the attacker has an item with the devastation effect and Rnd[100] < 5, triple the damage
  9. in Hellfire, if the attacker has an item with the jester's effect 50% of the time multiply damage by Rnd[100]/100, the other 50% multiply damage by 5·(Rnd[100]+20)/100
  10. in Hellfire, if the attack is an adjacent "quarter" damage attack, divide the damage by 4 (hence the "quarter" damage)
  11. in Hellfire, if the attacker has an item with the peril effect, double the damage
  12. the value now achieved is the final damage (FD)
  13. deal FD to the target

Steps 1-4 above will generate a damage value that is within the range shown for damage on the character screen.

Steps 5-12 above will further modify the damage by factors that will not be shown on the character screen.

Step 9 above is actually done as:

  1. calculate Rnd[200]
  2. if the value is below 100 multiply the damage by this value and then divide by 100
  3. otherwise subtract 80 and multiply by 5, then multiply the damage by this value and divide by 100

Hit consequences

  1. in Hellfire, if the attacker has an item of doppelganger's effect and the monster is not Diablo or an unique monster, duplicate the monster if Rnd[100] < 5
  2. in Hellfire, if the attacker has an item with the peril effect, take the damage from step 3 under Damage above, modify it for the -damage effect and deal it to the attacker
  3. if the attacker has an item equipped that has the "random life stealing" effect, calculate Rnd[FD/8] and add this to current life (while checking so that current life never exceeds max life)
  4. if the attacker has an item equipped that has 3% mana stealing, calculate 0.03·FD
  5. if the attacker has an item equipped that has 5% mana stealing, calculate 0.05·FD
  6. if the attacker do not have any item of corruption add the amount calculated in step 4 or 5 to the current mana (while checking so that current mana never exceeds max mana)
  7. if the attacker has an item equipped that has 3% life stealing, calculate 0.03·FD
  8. if the attacker has an item equipped that has 5% life stealing, calculate 0.05·FD
  9. add the amount calculated in step 7 or 8 to the current life (while checking so that current life never exceeds max life)
  10. in Hellfire, if the attacker hit and has an item equipped with the decay effect, subtract 5 from its To Hit bonus, if it reaches -100%, destroy the item
  11. if the attacker hit, check for weapon durability loss
  12. if the monster was not Stone Cursed and the player had an item with the "knock back" effect, move the monster one step backwards (backwards is defined according to the monster's facing)
  13. mark the attacker to be entitled to experience points when the monster dies
  14. if the target was not a golem and it was not resistant to the spell and FD >= mlvl+3, put monster into hit recovery; a Scavenger or Grave Digger will also be set in a mode to find a carcass to feast/dig upon
  15. if the target was a Hidden type of monster and it was not resistant to the spell, put monster into hit recovery as well as in retreat mode (see chapter 5.5.9 under Hidden).
  16. if the monster died, check for any item dropping (see chapter 3.8) and add any experience to the players that are eligible for it (see chapter 2.6)
  17. if the monster died and it was Diablo, terminate game and show ending movie for players on dlvl 16

6.2.2 Player versus Player

To Hit

  1. calculate 50 + Dexattacker/2 + ToHititems,attacker + clvlattacker + bonusattacker
  2. calculate Dextarget/5 + Acitems,target + bonustarget
  3. subtract the value in step 2 from the value in step 1
  4. if the value calculated is below 5, set it to 5
  5. if the value calculated is above 95, set it to 95
  6. the value now achieved is the final chance to hit (FTH)
  7. a hit is secured if Rnd[100] < FTH

The steps 1-6 above can be summarized to:

FTH = 50 + Dexattacker/2 + ToHititems,attacker + clvlattacker + bonusattacker - Dextarget/5 - Acitems,target - bonustarget

Block

  1. if the target is doing anything other than standing still or performing a melee attack, skip blocking
  2. if the target is not a Monk and is not carrying a shield, skip blocking
  3. if the target is a Monk and is not carrying a shield, a staff or has at least one hand bear, skip blocking
  4. calculate Dextarget + 2·clvltarget + bonustarget
  5. subtract 2·clvlattacker
  6. if the value calculated is below 0, set it to 0
  7. if the value calculated is above 100, set it to 100
  8. the value now achieved is the final chance to block (FB)
  9. a block of the attack is done if Rnd[100] < FB

The steps 3-8 above can be summarized to:

FB = Dextarget + 2·(clvltarget - clvlattacker) + bonustarget

Damage

  1. calculate Rnd[maxbase weapon damage - minbase weapon damage + 1] + minbase weapon damage (this is basically a random value within the weapons base damage range)
  2. add +% damage
  3. add +damage
  4. add character damage
  5. if the attacker is a Warrior or Barbarian then double damage if Rnd[100] < clvlattacker (critical hit)
  6. the value now achieved is the final damage (FD)
  7. deal FD to the target

Steps 1-4 above will generate a damage value that is within the range shown for damage on the character screen.

Steps 5-6 above will further modify the damage by factors that will not be shown on the character screen.

Hit consequences

  1. if the attacker has an item equipped that has the "random life stealing" effect, calculate Rnd[FD/8] and add this to current life (while checking so that current life never exceeds max life). It is worth noticing that in normal Diablo, the random stealing effect is only present on a single player quest item, so this step is this never performed.
  2. in Hellfire, if the attacker hit (regardless of blocking) and has an item equipped with the decay effect, subtract 5 from its To Hit bonus, if it reaches -100%, destroy the item
  3. if the attacker hit (regardless of blocking), check for weapon durability loss
  4. if the attacker hit and the target did not block, check if life went down to 0 or below, if so put target player into death mode and skip further steps
  5. if FD >= clvltarget and the target did not block then put target player into hit recovery and check for durability loss on helm and armor
  6. if the target blocked, put target player into block mode and check for durability loss on shield

For the probabilities of durability losses, see chapter 3.7.1.

6.2.3 Monster versus Player

To Hit

  1. calculate 30 + ToHitbase,monster + 2·mlvl
  2. calculate Dex/5 + Acitems,player + bonusplayer + 2·clvl
  3. subtract the value in step 2 from the value in step 1
  4. in Hellfire, if the player has extra AC versus Demons or Undead, subtract 40/20 if the monster is of the correct type
  5. if the value calculated is below 15, set it to 15
  6. on dlvl 14 if the value calculated is below 20, set it to 20
  7. on dlvl 15 if the value calculated is below 25, set it to 25
  8. on dlvl 16 if the value calculated is below 30, set it to 30
  9. the value now achieved is the final chance to hit (FTH)
  10. a hit is secured if Rnd[100] < FTH

The steps 1-9 above can be summarized to:

FTH = 30 + ToHitbase,monster + 2·(mlvl-clvl) - Dex/5 - Acitems,player - bonusplayer

Block

  1. if the target is doing anything other than standing still or performing a melee attack, skip blocking
  2. if the target is not a Monk and is not carrying a shield, skip blocking
  3. if the target is a Monk and is not carrying a shield, a staff or has at least one hand bear, skip blocking
  4. calculate Dex + 2·clvl + bonusplayer
  5. subtract 2·mlvl
  6. if the value calculated is below 0, set it to 0
  7. if the value calculated is above 100, set it to 100
  8. the value now achieved is the final chance to block (FB)
  9. a block of the attack is done if Rnd[100] < FB

The steps 3-8 above can be summarized to:

FB = Dex + 2·(clvl - mlvl) + bonusplayer

Damage

  1. calculate Rnd[maxbase damage - minbase damage + 1] + minbase damage (this is basically a random value within the monsters base damage range)
  2. add -damage
  3. if damage is below 1, set it to 1
  4. in Hellfire, if the player has a Reflect spell running, calculate the final reflected damage (FRD) by multiplying the damage by (Rnd[10] + 20)/100
  5. in Hellfire, if the player has a Reflect spell running, subtract FRD from the damage calculated in steps 1-3
  6. the value now achieved is the final damage (FD)
  7. deal FD to target

Hit consequences

  1. in Hellfire, if the monster hits and the player has a Reflect spell running, reflect FRD to it and check for death and hit recovery of the monster normally
  2. if the monster hits and it is a Black Death, remove 1 permanently from life
  3. if the player has any item equipped that has the "damage to attacker" effect, deal Rnd[3] + 1 damage to it and check for death and hit recovery of the monster normally
  4. if the monster had the knock back ability, move the player one step backwards (backwards is defined according to the player's facing)
  5. if the attacker hits and the target did not block, check if life went down to 0 or below; if so, put target player into death mode and skip further steps
  6. if FD >= clvl and the target did not block, put target player into hit recovery and check for durability loss on helm and armor
  7. if the target blocked, put target player into block mode and check for durability loss on shield

For the probabilities of durability losses, see chapter 3.7.1.

6.2.4 Monster versus Monster

To Hit

  1. if the target monster is an Illusion Weaver that is currently running away, exit as it is at the moment immune to any attack
  2. if the target is a monster that is Stone Cursed, the attack is an automatic hit, go directly to damage calculations
  3. the monsters base To Hit will also be the monsters final chance to hit (FTH) so the AC of the target has no effect
  4. a hit is secured if Rnd[100] < FTH

Damage

  1. calculate Rnd[maxbase damage - minbase damage + 1] + minbase damage (this is basically a random value within the monsters base damage range)
  2. the value now achieved is the final damage (FD)
  3. deal FD to target

Hit consequences

  1. if the target was not Stone Cursed and the attacker had attack type with the "knock back" effect, move the target one step backwards (backwards is defined according to the target's facing).
  2. if the attacker was a golem, mark the golem's owner to be entitled to experience points when the monster dies
  3. if FD >= mlvltarget+3 or if the target is a Hidden type of monster put target into hit recovery; a Scavenger or Grave Digger will also be set in a mode to find a carcass to feast/dig upon
  4. if the target died, check for any item dropping (see chapter 3.8) and add any experience to the players that are eligible for it (see chapter 2.6)
  5. if the target died and it was Diablo, terminate game and show ending movie