Damage formula determines damage in combat.
Typical order:
Base Damage -> Add flat bonuses to damage -> Add percentage bonuses-> add CtC attacks/effects -> add critical strike/hit multipliers -> add level ratio bonus -> Attack ->
Evasion/Dodge/Parry percents reduction/chance -> Damage resistances -> Damage reduction(flat)-> Damage absorb% -> damage absorb (flat)-> Skill to stat conversion(e.g. mana shield redirects n% damage to mana), stat reduced ->Damage to stat(e.g. mana bonus from damage) conversion from items -> HP reduction -> absorbed damage added as hp-> final HP -> Damage to Mana applies the converted mana.

Rule1 - stacking of reduction bonuses:
Percents before flat bonuses for damage reduction.
i.e. -20% goes before -20 damage.
Rule2 - stacking of offensive bonuses:
Percents after flat bonuses for damage calculation for attack.i.e. +x damage goes before +x% damage
Rule3 - levels of attacker/defender create a damage multiplier:
see http://videogamedesign.wikidot.com/stats:level-ratio
Rule4 - damage conversion applies after damage received only:
If modifiers convert damage to mana/hp/stat X, they come from absorbed(actually hitting and reducing hp) damage, instead of applying in earlier steps to avoid overpowered builds.i.e. convert 10% of received damage to mana, can't apply before the damage acts on the character.
Rule5 - resists come before absorbs, after evasion:
Damage resistances are calculated before absorbs or any action on received damage, but after evasion step.

Type of combat:
A - deterministic, non-random damage:
Avoid using chance-to-hit or armor class/defense points as much as possible - they add uncertainty to combat.
Instead use only damage reduction modifiers(-damage), absorb element/damage modifiers, blocking N damage instead of chance to block 100% of damage, and general %resistances to damage type.
Armor - gives reduces N damagetype, reduce n% damage type
Shields- as above, with blocks %n damage, blocks N damage(calculated before hitting armor)
Evade/Parry/Dodge/etc - calculated before hitting equipment as N% damage reduction for each step(Evades N% damage instead of chance to evade 100% damage).
Chance to cast X on-hit/on-attack/on-being-hit modifiers create various combat scenarios(e.g. dependence on CtC items and luck) which can be reframed as equally-distributed "chance" with http://videogamedesign.wikidot.com/mechanic:deterministic-chance to create predictable damage output(use 1 in X attacks modifiers).

B - Chance based combat:
Use chance-to-hit/miss extensively.
As above, but each percentage to reduce damage is now a percentage chance to avoid all damage and CtC chance is acting normally.

if you plan on skill-centric approach vs stat-centric approach use A, if you prefer stat-centric approach use B.