6.3 Non melee attacks

Here we will deal with all other attacks, which include spells, arrows and traps (which are either spells or arrows). As there are so many more possibilities and special cases, some sections have been divided up to handle specific cases.

6.3.1 Player versus Monster

To Hit

  1. if the effect is Holy Bolt and the monster is not undead or Diablo, exit as other monsters are immune
  2. if the target monster is an Illusion Weaver that is currently running away, exit as it is at the moment immune to any attack
  3. if the monster is immune to the spell type, exit as it can't be damaged
  4. if the target is a monster that is Stone Cursed, the attack is an automatic hit, go directly to damage calculations
  5. if the effect is an arrow, calculate 50 + Dex + ToHititems + clvl + bonusplayer - distance·distance/2
  6. if the effect is an arrow, subtract Acmonster
  7. if the effect is a spell, calculate 50 + Mag + bonusplayer
  8. if the effect is a spell, subtract 2·mlvl
  9. if the value calculated is below 5, set it to 5
  10. if the value calculated is above 95, set it to 95
  11. the value now achieved is the final chance to hit (FTH)
  12. a hit is secured if Rnd[100] < FTH

The steps 5-11 above can be summarized to:

FTHarrow = 50 + Dex + ToHititems + clvl + bonusplayer - distance·distance/2 - Acmonster

FTHspell = 50 + Mag + bonusplayer - 2·mlvl

Damage

  1. for spells, the actual damage is calculated upon cast. For information about damage ranges for spells, see chapter 4.1.2.
  2. if the effect is an arrow, calculate Rnd[maxbase weapon damage - minbase weapon damage + 1] + minbase weapon damage (this is basically a random value within the weapons base damage range)
  3. if the effect is an arrow, add +% damage
  4. if the effect is an arrow, add +damage
  5. if the effect is an arrow, add character damage
  6. if the effect is a spell and the monster has resistance, divide damage by 4
  7. if the spell is Bone Spirit, damage is [current lifemonster]/3
  8. the value now achieved is the final damage (FD)
  9. deal FD to the target

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

Note that in Hellfire, Diablo and Bone Demons have resistance to Holy Bolt.

Hit consequences

  1. for firing bows, the durability loss check is done regardless of a hit or miss; it is checked each time the character fires
  2. if the monster was not Stone Cursed and the player had a bow with the "knock back" effect, move the monster one step backwards (backwards is defined according to the monster's facing)
  3. if the attack was done with arrows or by a spell to which the monster was not resistant, mark the attacker to be entitled to experience points when the monster die
  4. 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
  5. 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).
  6. if the monster had no specific target before, set the player as the target, this basically activates a monster that gets hit regardless of distance
  7. 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)
  8. if the monster died and it was Diablo, terminate game and show ending movie

6.3.2 Player versus Player

To Hit

  1. if the target is immune to the spell type, exit as it can't be damaged; this is true for spells like Apocalypse and Holy Bolt
  2. if the effect is an arrow, calculate 50 + Dexattacker + ToHititems,attacker + clvlattacker + bonusattacker - distance·distance/2
  3. if the effect is an arrow, calculate Dextarget/5 + Acitems,target + bonustarget2.1.4
  4. subtract the value in step 3 from the value in step 2
  5. if the effect is a spell, calculate 50 + Magattacker + bonusattacker
  6. if the effect is a spell, subtract 2·clvltarget
  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 2-9 above can be summarized to:

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

FTHspell = 50 + Magattacker + bonusattacker - 2·clvltarget

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. if the spell type is not blockable, skip blocking
  5. if the spell type is blockable but the target has resistance to it, skip blocking
  6. calculate block Dextarget + 2·clvltarget + bonustarget
  7. subtract 2·clvlattacker
  8. if the value calculated is below 0, set it to 0
  9. if the value calculated is above 100, set it to 100
  10. the value now achieved is the final chance to block (FB)
  11. a block of the attack is done if Rnd[100] < FB

The steps 5-10 above can be summarized to:

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

Damage

  1. for spells, the actual damage is calculated upon cast. For information about damage ranges for spells, see chapter 4.1.2.
  2. if the effect is an arrow, calculate Rnd[maxbase weapon damage - minbase weapon damage + 1] + minbase weapon damage (this is basically a random value within the weapons base damage range)
  3. if the effect is an arrow, add +% damage
  4. if the effect is an arrow, add +damage
  5. if the effect is an arrow and the attacker is a Rogue, add character damage
  6. if the effect is an arrow and the attacker is a Warrior or Sorcerer, add double character damage
  7. if the spell is Bone Spirit, damage is [current lifetarget]/3
  8. if the effect is a spell, divide damage by 2
  9. if the effect is a spell and the target has resistance to it, reduce the damage by the amount specified by the resistance
  10. the value now achieved is the final damage (FD)
  11. deal FD to the target

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

Step 6 above will further modify the damage by factors that will not be shown on the character screen. Shown on character screen is normal character damage, not double, for all character classes.

Hit consequences

  1. for firing bows, the durability loss check is done regardless of a hit or miss; it is checked each time the character fires
  2. 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
  3. if the target did not block and effect was an arrow or it was a spell and the target had no resistance to the spell type, check if FD >= clvltarget and, if so, put target player into hit recovery and check for durability loss on helm and armor
  4. if the target blocked, put target player into block mode and check for durability loss on shield

6.3.3 Monster/Trap versus Player

Fire Wall, Flame Wave and Ring of Fire also uses this chapter when attacking players.

To Hit

  1. if the effect is an arrow from a monster, calculate 30 + ToHitbase,monster + 2·mlvl - 2·distance
  2. if the effect is an arrow from a monster, subtract Dex/5 + Acitems,player + bonusplayer + 2·clvl
  3. if the effect is an arrow from a trap, calculate 100 - (Dex/5 + Acitems,player + bonusplayer + 2·clvl) / 2 - 2·distance
  4. if the effect is a spell from a monster, calculate 40 + 2·mlvl
  5. if the effect is a spell from a monster, subtract 2·clvl
  6. if the effect is a spell from a trap or a player, set To Hit to 40
  7. if the value calculated is below 10, set it to 10
  8. on dlvl 14 if the value calculated is below 20, set it to 20
  9. on dlvl 15 if the value calculated is below 25, set it to 25
  10. on dlvl 16 if the value calculated is below 30, set it to 30
  11. the value now achieved is the final chance to hit (FTH)
  12. a hit is secured if Rnd[100] < FTH

The steps 1-11 above can be summarized to:

FTHmonster arrow = 30 + ToHitbase,monster + 2·mlvl - 2·distance - Dex/5 - Acitems,player - bonusplayer - 2·clvl

FTHtrap arrow = 100 - (Dex/5 + Acitems,player + bonusplayer + 2·clvl) / 2 - 2·distance

FTHmonster spell = 40 + 2·mlvl - 2·clvl

FTHtrap spell = 40

FTHplayer spell = 40

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. if the spell type is not blockable, skip blocking
  5. in Diablo, if the spell type is blockable but the target has resistance to it, skip blocking
  6. if the attacker is a monster calculate block Dex + 2·clvl + bonusplasyer
  7. if the attacker is a monster subtract 2·mlvl
  8. if the attacker is a trap, calculate Dextarget + bonustarget
  9. if the value calculated is below 0, set it to 0
  10. if the value calculated is above 100, set it to 100
  11. the value now achieved is the final chance to block (FB)
  12. a block of the attack is done if Rnd[100] < FB

The steps 5-11 above can be summarized to:

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

Damage

  1. for spells and traps, the actual damage is calculated upon cast. For information about damage ranges for spells, see chapter 4.1.2 for traps and chapter 4.1.2 for spells from players.
  2. if the attacker is a trap and the player has an item of thieves, divide damage by 2
  3. in Hellfire, if the attacker is not a trap, divide damage by 2
  4. add -damage
  5. if damage is below 1, set it to 1
  6. if the effect is a spell and the target has resistance to it, reduce the damage by the amount specified by the resistance
  7. the value now achieved is the final damage (FD)
  8. deal FD to target

Hit consequences

  1. if the effect was an arrow and the monster had the knock back ability, move the player one step backwards (backwards is defined according to the player's facing)
  2. 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
  3. if the target did not block and effect was an arrow or it was a spell and the target had no resistance to the spell type, check if FD >= clvl and, if so, put target player into hit recovery and check for durability loss on helm and armor
  4. if the target blocked, put target player into block mode and check for durability loss on shield

6.3.4 Monster/Trap 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 monster is immune to the spell type, exit as it can't be damaged
  3. if the target is a monster that is Stone Cursed, the attack is an automatic hit; go directly to damage calculations
  4. if the effect is an arrow, calculate 90 - Actarget - distance
  5. if the effect is a spell, calculate 90 - Actarget
  6. if the value calculated is below 5, set it to 5
  7. if the value calculated is above 95, set it to 95
  8. the value now achieved is the final chance to hit (FTH)
  9. a hit is secured if Rnd[100] < FTH

The steps 4-7 above can be summarized to:

FTHarrow = 90 - Actarget - distance

FTHspell = 90 - Actarget

Damage

  1. for spells and traps, the actual damage is calculated upon cast. For information about damage ranges for spells, see chapter 4.1.2.
  2. if the effect is a spell and the monster has resistance, divide damage by 4
  3. the value now achieved is the final damage (FD)
  4. deal FD to the target

Hit consequences

  1. 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
  2. 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).
  3. 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)
  4. if the monster died and it was Diablo, terminate game and show ending movie