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.
However, note that the actual damage you do is different from what is displayed on your party tab, as it can be affected by resistances .
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.
Damage Types
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.
Flat
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.
Ranged
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.
Melee
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.
Elemental damages
Arcane
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.
Nether
Increases the damage of all classes and is a player-favorite to invest in. Has the highest damage percentage from gears.
Fire
Increases the damage of all classes but primarily invested by Fire Mages. Has the lowest damage percentage for elemental gears.
Lightning
Increases the damage of all classes but primarily invested by Lightning Mages. Ideal for stun builds.
Ice
Increases the damage of all classes but primarily invested by Ice Mages.
Multipliers
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.
Formula (Estimate)
Normal Attack Damage = base damage + base damage* damage modifier + base damage * ranged damage modifier + base damage * arcane damage modifier + base damage * nether damage modifier + base damage * fire damage modifier + base damage * ice damage modifier + base damage * lightning damage modifier
Then put in the resistances for actual damage.
Next, factor in armor value. e.g 100 armor will reduce 100 damage but piercing can negate effect. 10% piercing will make armor 90.
//calculate armor/piercing
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);