Hydraguy fandompants.png
Gamepedia and Fandom have joined forces and our combined teams would like to encourage all Diablo fans to unite and work together as well.
Please head to the community portal to discuss whether this wiki should merge with Fandom's Diablo community.

Spell Calculations (Diablo I)

From Diablo Wiki
Jump to: navigation, search

Calculating the magnitude of a spell (damage, healing, or duration) is implemented in Diablo I using several different variables and specific functions.[1]


  • slvl: the level of the spell
  • clvl: the level of the character
  • mlvl: the level of the monster in context
  • maxmana: maximum mana of the character
  • maxlife: maximum hitpoints of the character


  • [ ]: round down
  • Rnd[x]: random number in the range 0 to x - 1
  • Rnd[clvl]: random number in the range 0 to character level - 1
  • Rec(slvl, slvl0): a recursive function defined as follows,
    • Rec(0, slvl0) → [slvl0]
    • for slvl > 0; Rec(slvl, slvl0) → [Rec(slvl - 1, slvl0) * 9/8]
  • Itt(n, value): an iterative function, defined as follows,
    • Itt(0, value) → value
    • for n > 0; Itt(n, value) → Itt(n - 1, value) + value