Damage

Damage is a loss of health points inflicted by the use of an equipment or a spell on characters.

Types of Damage
Damage has one of five element types: neutral (linked to strength), earth (linked to strength), water (linked to chance), fire (linked to intelligence) or air (linked to agility). Each elemental damage is increased by corresponding characteristics.

Earth and neutral elemental damages are called Physical damage. Fire, water and air elemental damages are called Magical damage.

Indirect damage is damage from effects on a character such as poison. Direct damage is all other kinds, including glyphs.

Static damage (or hp loss) is damage that cannot be modified in any way.

Area of effect (AoE) damage is damage that affects more than one square of the battlefield and therefore has the potential of damaging more than one enemy. When targeting an AoE weapon or spell, the orange squares on the grid refer to the area that will be affected. If an ally is on one of these orange squares, the ally will suffer damage too. All hammers and staffs inflict AoE damage; two spells that inflict AoE damage are Explosive Arrow and Punch Of The Crackler.

Damage Modifiers
Base damage of a weapon or a spell is modified by various sources. The increase (or decrease) may be either in percentage or fixed amount. Percentage addition to damage is called percent damage. Linear addition to damage is called plus damage.

Offensive

 * Spells of Percent Damage effect: Powerful Shooting, Power, Life Transfer, and Fangs of Boowolf.
 * Equipments of Percent Damage effect: See Category:Percent damage equipment.
 * Spells of Plus damage effect: Art of Staff, Bow Skill (cra), Increase, Bravery Guide, Compulsion, Mutilation, Divine Sword, All or Nothing, Mass Compulsion, Fury, Perception, Mummification, Bear Cry
 * Equipments of plus damage damage effect: Gobball Set, Treechnid Set, Prespic Set, Bandit Set, Arachnee Set. See Category:Damages equipment for more.
 * Weapon skill: A percentage addition to damage on weapon attacks only. Each weapon skill is specific to one weapon type. Weapon skill is unlike other percentage damage bonuses in that it is applied to the base damage first while the rest of percentage damage bonuses are applied individually at the same time to the damage amount that has already been increased by a weapon skill. That is, the percentage increase from a weapon skill is incrementally increased by other percentage bonuses.
 * Characteristics: A percentage addition to the damage of linked elements by 1% per point.
 * Heals: A linear addition to healing only.
 * Class modifier: A percentage addition to damage on weapon attacks only. Each modifier is specific to one weapon type.


 * {| border="1" cellpadding="3" cellspacing="0"

! Weapon > \/ Class ! Axe !! Bow !! Dagger !! Hammer !! Pickaxe !! Scythe !! Shovel !! Staff !! Sword !! Wand ! Sadida ! Osamodas ! Enutrof ! Sram ! Xelor ! Ecaflip ! Eniripsa ! Iop ! Cra ! Feca ! Sacrier ! Pandawa
 * 0 || -30% || -30% || -10% || ? || 0 || -10% || style="background-color: #44CC44" | 50% || -30% || 0
 * -10% || -30% || 0 || style="background-color: #44CC44" | 40% || ? || 0 || -10% || -20% || -30% || style="background-color: #44CCCC" | 20%
 * 0 || -30% || -20% || 0 || ? || 0 || style="background-color: #44CC44" | 40% || -25% || -10% || -10%
 * -20% || 0 || style="background-color: #44CC44" | 40% || -20% || ? || 0 || -20% || -30% || 0 || -10%
 * -20% || -30% || 0 || style="background-color: #44CC44" | 40% || ? || 0 || -20% || -20% || -30% || style="background-color: #44CCCC" | 30%
 * -10% || -20% || -10% || -10% || ? || -10% || -10% || -10% || style="background-color: #44CC44" | 0 || -20%
 * -30% || -30% || 0 || -30% || ? || 0 || -30% || -20% || -30% || style="background-color: #44CC44" | 40%
 * style="background-color: #44CCCC" | 10% || -20% || style="background-color: #44CCCC" | 10% || style="background-color: #44CCCC" | 10% || ? || 0 || style="background-color: #44CCCC" | 10% || 0 || style="background-color: #44CC44" | 20% || -40%
 * -30% || style="background-color: #44CC44" | 40% || 0 || -30% || ? || 0 || -30% || -20% || -20% || -20%
 * -10% || -25% ||style="background-color: #44CCCC" | 10% || -20% || ? || 0 || -20% || style="background-color: #44CC44" | 40% || -10% || 0
 * -30% || -30% || -30% || -30% || -30% || -30% || -30% || -30% || -30% || -30%
 * style="background-color: #44CC44" | 40% || -30% || -30% || -30% || ? || -30% || -30% || style="background-color: #44CCCC" | 10% || -30% || -30%
 * }


 * The green fields are the best weapon for each class. Bluish fields are other weapons with a bonus. "0" means no modifier, neither bonus nor penalty.


 * Critical hit: In the case of weapons, critical hit bonus is added to the base damage range upon critical hits. For example, Captain Chafer's Small Daggers has +10 crit hit bonus, which will boost the regular damage range 15-22 to 25-32. In the case of attack spells, the damage range of critical hit applies instead of the regular damage range. For example, the damage range of Pressure level 1 boosts from 5-9 to 7-11 upon critical hits.
 * Critical failure: Your damage output will be zero upon critical failures. Fatal critical failures further end your turn right away.

Defensive

 * Shield (effect): A linear reduction of direct damage. Shield effects may be limited to certain elements only. Shield effects are modified by the defender's intelligence and the associated characteristic of the attack's element.
 * Reflect: A linear reduction of direct damage, like shields, but also deal the same amount to the attacker as static damage. The reflected damage cannot exceed the original attack's damage. Reflect effects are modified by the defender's wisdom. Formula: Damage Reflected = Spell Reflect Damage * [(Wisdom / 100) + 1)


 * Percentage Reduction: A percentage reduction of direct damage. There are two known effects of the same kind,spell Boozer and spell Feca Shield
 * Resistance: A percentage reduction of direct and indirect damage. Resistance effects are limited to a single element each.


 * Reduction: A linear reduction of direct and indirect damage. Reduction effects are limited to either physical, magical damage, or one particular element.

Calculation
Firstly, the damage bonus of weapon skill is applied to base damage. Secondly, various percent damage bonuses (class modifier, relevant characteristic, percent damage bonuses from equipment) are applied. Thirdly, plus damage bonuses are added. Lastly, the resistance of the target is applied. Decimal numbers are all rounded. For example, if you are a cra (bow 40%) using an earth-damage bow of the base damage of 15, with 200 points of strength, level 5 bow skill (60%), 50% damage bonus and +10 damage bonus from equipment, your damage output against a monster with 0% earth resistance will be (((15 * 1.6) * (1.0 + 2.0 + 0.4 + 0.5)) + 10) * (1.0 - 0.0) - 0.0= 103

That is, ((base * skill)*(1.0 + stat + class bonus + percent equipment bonus)) + linear equipment bonus)*(1.0 - percent resistance) - linear resistance.

-Note-
 * Every time below a value is stored to "Res" it is truncated to a whole number so if you have a weapon base dmg of 3 and lvl 6 weapon skill it equals 4.95 base damage but is only saved as 4.

Res = Base Res = Math.floor( Res * WpnSki ) Res = Math.floor( Res * (1 + ClassMod + Stat/100 + PctDmg) ) Res = Res + LinDmg Res = Resist( Res ) Base : Random value from base damage range WpnSki : Weapon skill. (Weapon attack only.) ClassMod : Class modifier with given weapon. (Weapon attack only.) Stat : Total value of relevant characteristic. Minimum 0. PctDmg : All bonuses of type +x% damage. LinDmg : All bonuses of type +x damage. Resist : Enemy's resistance. Exact formula unknown at the moment.

Needs confirmation: (modified to include crit) (An average damage formula) (1+WpnSki)*(1+ClassMod+Stat/100+PctDmg)*(Base*(1-1/(FailRate-FailStat))+CritBonus/(CritHit-CritStat)*AgiMod)+LinDmg) the term additions include: CritStat : +crit from Set/spells CritBonus : the bonus your spell/weapon adds on a crit CritHit : the base chance your spell/weapon will crit AgiMod : the % modifier that your total agi multiplies your crit chance by FailRate : the chance your spell/weapon will critically fail FailStat : +critical failure from Set (or spells?)

AgiMod further explained: at 120 agi you would have 50/30 or a mod of 1.667. notice this isnt affected by the base crit chance (in this case 50). if your base crit is 5 it will still produce 1.667 or 5/3 in this case. also "base crit" is a poor use on my part. +crit Set modifies your true base crit before agi is applied.

on a final note, i'll admit i've made some assumptions about this damage formula, like about the critical failure rate. however in practice so far this checks out for me (my max/min crits fall within the expected range), so i'd like to see what everyone else has found from experience.

Advanced Damage Formulas
The following formulas are explained and defined in greater detail in Maximize Your Damage, the Dofus Damage Guide by Doctor T (see the External Links section below for a link to the complete guide). These formulas are designed to help you get stats and Set to best support a given Spell/Weapon in order to deal the most damage possible. These two formulas are briefly outlined here, for a more detailed explanation see the guide. The following is used with permission:

This is the first of the two calculations, and represents the average damage that will be dealt with a given Spell or Weapon with no stat boosts from Set, Characteristics, or Spells. For this calculation as defined here, Critical Failures do not have an affect on the result, but Critical hits do. The only buff that changes ABD comes from Weapon Skills, for that is the only buff that increases the Base Damage of an attack directly, before any stats take affect (this obviously will only affect Weapons of the same type as the Skill cast).
 * Average Base Damage (ABD)

Here are definitions of the values used in the calculations: ABD = Average Base Damage NC_MIN = Minimum Base Damage of the selected Spell on a Non-Crit NC_MAX = Maximum Base Damage of the selected Spell on a Non-Crit CR_MIN = Minimum Base Damage of the selected Spell on a Critical Hit CR_MAX = Maximum Base Damage of the selected Spell on a Critical Hit MIN = Minimum Base Damage of the selected Weapon (on a Non-Crit) MAX = Maximum Base Damage of the selected Weapon (on a Non-Crit) CRIT_B = The Crit Bonus of the selected Weapon, which denotes how much more damage the weapon will do on a Critical Hit CRIT_VAL = The bottom part of the fraction that represents your current Chance of getting a Critical Hit Example: (you have a 1/CRIT_VAL chance of getting a Critical Hit) SKILL_VAL = The amount of Damage Increase granted by the Weapon Skill active Example: (your current active Weapon Skill increases your damage by SKILL_VAL%)

Calculation of the Average Base Damage of a Spell: ABD = ( [(NC_MIN + NC_MAX) / 2]*[CRIT_VAL - 1] + [(CR_MIN + CR_MAX) / 2] ) / CRIT_VAL

Calculation of the Average Base Damage of a Weapon: ABD = [ ( [(MIN + MAX) / 2]*[CRIT_VAL - 1] + [([MIN + CRIT_B] + [MAX + CRIT_B]) / 2] ) / CRIT_VAL ] * [100+SKILL_VAL]/100

This second of the Advanced Damage Formulas allows you to find the connection between Plus damage and Percent Damage when using the selected Spell or Weapon. It expands upon the ABD calculation explained above to find the total amount of Percent Damage needed to deal one more point of damage with that Spell/Weapon. In essence, each Plus damage boost you receive will increase your damage with the selected Spell/Weapon by the same amount as a Percent Damage boost equal to the DVE.
 * Damage Value Equivalent (DVE)

Calculation of the Damage Value Equivalent of a Spell or Weapon: DVE = 100 / ABD