Damage is the value of your base damage (calculated by the Strength attribute for Warriors and Rogues, the Agility attribute for Rogues, and the Magic attribute for Mages) Plus the damage out put on weapons the base damage +1 per gem level and +2 per Ascension. From the base damage value all the other damage boosts are then calculated from it.
See here for damage details.
Note:- That the damage for warriors and rogues with melee and ranged aren't multiplied but the the buff effect is.
There are eight damage types: Flat, Ranged, Melee, Arcane, Nether, Fire, Ice, and Lightning.
Ai damage types
New damage for ai have been added. Are 3 types flat, physical and magic ai damages. These are factor in at the base damage before rest of calculation see below.
Often referred to as Flat damage or Basic damage. It becomes either physical type or magic type and is negated by resists depending on the class.
The name can be misleading as this does not increase the damage of Mages, but only bow-wielding Rogues (although they are both ranged). Primarily used by builds that have a large number of bow-wielding Rouges. Increases the damage of bow-wielding Rogues in brawls.
Increases the damage of melee attacks, used my dagger-wielding Rouges and Warriors. Primarily used by builds that have a large number of dagger-wielding Rouges or Warriors. Increases the damage of dagger-wielding Rouges or Warriors in brawls.
Increases the damage of all classes and is a player-favorite to invest in. Increases the damage of Mages in brawls aswell as basic mage attack.
Increases the damage of all classes and is a player-favorite to invest in. Has the highest damage percentage from gears.
Increases the damage of all classes but primarily invested by Fire Mages. Has the lowest damage percentage for elemental gears.
Increases the damage of all classes but primarily invested by Lightning Mages. Ideal for stun builds.
Increases the damage of all classes but primarily invested by Ice Mages.
Multipliers effect damage
A scenario would be: If you do 100 of base damage, using a lightning spell and with 10% lightning will not do 110 damage, as many may think. Instead you get multiplier damage, which means you'll 10 bonus on any spell, not limited to lightning ones. However, the effect is increased for lightning spells, which is why you should invest certain damages for certain spells.
This applied to all types of damage, not just lightning.
Damages can also affect status spells
On bow-wielding rogues, Ranged Damage increases the potency of spells that stun. bleed and burn.
Likewise, Lightning Damage increases potency of the stun effect of lightning spells used by Mages. However, Ice Damage does not increase the slow effect as it is capped at a certain percentage. Damage that can burn will increase damage the next burn attack will do. All fire damage has burn but is also on bow rogues which uses ranged but it does burn also. Trinkets also have burn which will turn all attacks into burn and attacks with burn will do alot more.
Melee damage will increase the bleed effect of warrior and rogue skills that has the effect.
For Melee attacks:
Note that critical damage is factored in at base damage.
For Ranged attacks, change Melee resistance value to Ranged resistance.
For Magic attacks, change Physical resistance to Magic resistance and Melee resistance to ranged resistance. Disregard the Magic Resistance value at the end.
Next, factor in armor value. e.g 100 armor will reduce 100 damage but piercing can negate effect. 10% piercing will make armor 90.
int targetArmor = target.getArmor(); double sourcePiercing = source.getPiercing(); double armor = Math.Max(Math.Floor((targetArmor - (targetArmor * sourcePiercing)) * .5 ),0); //calculate damage minus armor damage.damage = Engine.ToINT(damage.damage - armor);