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
- if the effect is Holy Bolt and the monster is not undead or Diablo, exit as other monsters are immune
- if the target monster is an Illusion Weaver that is currently running away, exit as it is at the moment immune to any attack
- if the monster is immune to the spell type, exit as it can't be damaged
- if the target is a monster that is Stone Cursed, the attack is an automatic hit, go directly to damage calculations
- if the effect is an arrow, calculate 50 + Dex + ToHititems + clvl + bonusplayer - distance·distance/2
- if the effect is an arrow, subtract Acmonster
- if the effect is a spell, calculate 50 + Mag + bonusplayer
- if the effect is a spell, subtract 2·mlvl
- if the value calculated is below 5, set it to 5
- if the value calculated is above 95, set it to 95
- the value now achieved is the final chance to hit (FTH)
- 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
- The bonusplayer for arrows is 10 for Warriors and Bards, 20 for Rogues, and 0 for all other classes.
- The bonusplayer for spells is 20 for Sorcerers, 10 for Bards, and 0 for all other classes.
- Note that if FTH is below 5 or above 95 it is adjusted to 5 and 95. This is commonly referred to as the auto hit and auto miss of a character.
Damage
- for spells, the actual damage is calculated upon cast. For information about damage ranges for spells, see chapter 4.1.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)
- if the effect is an arrow, add +% damage
- if the effect is an arrow, add +damage
- if the effect is an arrow, add character damage
- if the effect is a spell and the monster has resistance, divide damage by 4
- if the spell is Bone Spirit, damage is [current lifemonster]/3
- the value now achieved is the final damage (FD)
- 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
- for firing bows, the durability loss check is done regardless of a hit or miss; it is checked each time the character fires
- 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)
- 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
- 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
- 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).
- 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
- 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)
- if the monster died and it was Diablo, terminate game and show ending movie
6.3.2 Player versus Player
To Hit
- 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
- if the effect is an arrow, calculate 50 + Dexattacker + ToHititems,attacker + clvlattacker + bonusattacker - distance·distance/2
- if the effect is an arrow, calculate Dextarget/5 + Acitems,target + bonustarget2.1.4
- subtract the value in step 3 from the value in step 2
- if the effect is a spell, calculate 50 + Magattacker + bonusattacker
- if the effect is a spell, subtract 2·clvltarget
- if the value calculated is below 5, set it to 5
- if the value calculated is above 95, set it to 95
- the value now achieved is the final chance to hit (FTH)
- 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
- The bonusattacker for arrows is 10 for Warriors and Bards, 20 for Rogues, and 0 for all other classes.
- The bonusattacker for spells is 20 for Sorcerers, 10 for Bards, and 0 for all other classes.
- The bonustarget is clvl/4 for Barbarians, depends on the armor type for Monks (0 for non unique plate, clvl/2 for non unique mail or unique plates and 2·clvl for light armor and unique mail or if naked) and 0 for all other classes.
- Note that if FTH is below 5 or above 95 it is adjusted to 5 and 95. This is common referred to as the auto To Hit and auto miss of a character.
Block
- if the target is doing anything other than standing still or performing a melee attack, skip blocking
- if the target is not a Monk and is not carrying a shield, skip blocking
- if the target is a Monk and is not carrying a shield, a staff or has at least one hand bear, skip blocking
- if the spell type is not blockable, skip blocking
- if the spell type is blockable but the target has resistance to it, skip blocking
- calculate block Dextarget + 2·clvltarget + bonustarget
- subtract 2·clvlattacker
- if the value calculated is below 0, set it to 0
- if the value calculated is above 100, set it to 100
- the value now achieved is the final chance to block (FB)
- 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
- The bonustarget is 30 for Warriors and Barbarians, 25 for Monks and Bards, 20 for Rogues, and 10 for Sorcerers. Note that there seems to be a bug that makes all those bonus values be 0.
- In the cases according to step 1-4 above when a block is not checked, the game actually DOES a random check but the value checked against is 100 and thus will never result in a block.
- It is possible to achieve 100% blocking.
- Although a player will block monsters even with resistance in Hellfire, they will never block an attack from another player when having resistance.
Damage
- for spells, the actual damage is calculated upon cast. For information about damage ranges for spells, see chapter 4.1.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)
- if the effect is an arrow, add +% damage
- if the effect is an arrow, add +damage
- if the effect is an arrow and the attacker is a Rogue, add character damage
- if the effect is an arrow and the attacker is a Warrior or Sorcerer, add double character damage
- if the spell is Bone Spirit, damage is [current lifetarget]/3
- if the effect is a spell, divide damage by 2
- if the effect is a spell and the target has resistance to it, reduce the damage by the amount specified by the resistance
- the value now achieved is the final damage (FD)
- 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
- for firing bows, the durability loss check is done regardless of a hit or miss; it is checked each time the character fires
- 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
- 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
- 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
- if the effect is an arrow from a monster, calculate 30 + ToHitbase,monster + 2·mlvl - 2·distance
- if the effect is an arrow from a monster, subtract Dex/5 + Acitems,player + bonusplayer + 2·clvl
- if the effect is an arrow from a trap, calculate 100 - (Dex/5 + Acitems,player + bonusplayer + 2·clvl) / 2 - 2·distance
- if the effect is a spell from a monster, calculate 40 + 2·mlvl
- if the effect is a spell from a monster, subtract 2·clvl
- if the effect is a spell from a trap or a player, set To Hit to 40
- if the value calculated is below 10, set it to 10
- on dlvl 14 if the value calculated is below 20, set it to 20
- on dlvl 15 if the value calculated is below 25, set it to 25
- on dlvl 16 if the value calculated is below 30, set it to 30
- the value now achieved is the final chance to hit (FTH)
- 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
- ToHitbase,monster is the value found in the tables for each monster in chapter 5.2 and 5.4.
- Fire Wall, Flame Wave and Ring of Fire always attack players as if they were traps.
- For unique monsters, use mlvlbattle
- The bonusplayer is clvl/4 for the Barbarian, depends on the armor type for Monks (0 for non unique plate, clvl/2 for non unique mail or unique plates and 2·clvl for light armor and unique mail or if naked) and 0 for all other classes.
- Note that the FTH is adjusted for auto hit values.
Block
- if the target is doing anything other than standing still or performing a melee attack, skip blocking
- if the target is not a Monk and is not carrying a shield, skip blocking
- if the target is a Monk and is not carrying a shield, a staff or has at least one hand bear, skip blocking
- if the spell type is not blockable, skip blocking
- in Diablo, if the spell type is blockable but the target has resistance to it, skip blocking
- if the attacker is a monster calculate block Dex + 2·clvl + bonusplasyer
- if the attacker is a monster subtract 2·mlvl
- if the attacker is a trap, calculate Dextarget + bonustarget
- if the value calculated is below 0, set it to 0
- if the value calculated is above 100, set it to 100
- the value now achieved is the final chance to block (FB)
- 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
- The bonusplayer is 30 for Warriors and Barbarians, 25 for Monks and Bards, 20 for Rogues, and 10 for Sorcerers. Note that there seems to be a bug that makes all those bonus values be 0.
- For unique monsters, use mlvlbattle
- In the cases according to step 1-4 above when a block is not checked, the game actually DOES a random check, but the value checked against is 100 and thus will never result in a block.
- It is possible to achieve 100% blocking.
Damage
- 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.
- if the attacker is a trap and the player has an item of thieves, divide damage by 2
- in Hellfire, if the attacker is not a trap, divide damage by 2
- add -damage
- if damage is below 1, set it to 1
- if the effect is a spell and the target has resistance to it, reduce the damage by the amount specified by the resistance
- the value now achieved is the final damage (FD)
- deal FD to target
Hit consequences
- 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)
- 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
- 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
- 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
- if the target monster is an Illusion Weaver that is currently running away, exit as it is at the moment immune to any attack
- if the monster is immune to the spell type, exit as it can't be damaged
- if the target is a monster that is Stone Cursed, the attack is an automatic hit; go directly to damage calculations
- if the effect is an arrow, calculate 90 - Actarget - distance
- if the effect is a spell, calculate 90 - Actarget
- if the value calculated is below 5, set it to 5
- if the value calculated is above 95, set it to 95
- the value now achieved is the final chance to hit (FTH)
- a hit is secured if Rnd[100] < FTH
The steps 4-7 above can be summarized to:
FTHarrow = 90 - Actarget - distance
FTHspell = 90 - Actarget
- Note that if FTH is below 5 or above 95 it is adjusted to 5 and 95. This is the same auto To Hit and auto miss that characters have.
Damage
- for spells and traps, the actual damage is calculated upon cast. For information about damage ranges for spells, see chapter 4.1.2.
- if the effect is a spell and the monster has resistance, divide damage by 4
- the value now achieved is the final damage (FD)
- deal FD to the target
Hit consequences
- 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
- 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).
- 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)
- if the monster died and it was Diablo, terminate game and show ending movie