RPG MO Wiki
Register
Advertisement

Defense is a Skill that reduces the chance an enemy will deal Physical Damage, directly reduces Magic Damage and is a requirement for Equipment, primarily for Armors.

Effect on Combat[]

Taking less damage is key for sustained combat, saving time by not refilling on food as often and money by consuming less food.

Equipment's armor is added to your defense stat, at a rate of 3 armor for 1 defense.

Physical Damage Formula[]

(Note: formula based on source code on 16/05/2015)

Using the following variables:

  • str = attacker's strength
  • acc = attacker's accuracy
  • pow = attacker's power
  • aim = attacker's aim
  • def = target defense
  • arm = target armor

And the following functions:

  • Random() - gives a random number between 0 and 1
  • Max(a, b) - equal to "a" or "b", whichever is larger
  • Ceiling(a) - gives the smallest integer equal or larger than "a"

Damage is calculated as follows:

  1. tot_str = str + pow / 2
  2. tot_acc = acc + aim / 2
  3. tot_def = def + arm / 3
  4. if combat style is aggressive, tot_str = tot_str + 1
  5. if combat style is defensive, tot_def = tot_def + 1
  6. if combat style is accurate, tot_acc = tot_acc + 1
  7. temp_damage = 1 + (tot_str / 5) * Random()
  8. temp_defense = Max(0, tot_def - tot_acc) * Random()
  9. final_damage = Max(0, Ceiling(temp_damage - temp_defense))
Advertisement