Here are the two primary formulas for calculating how damage is dealt in the game (base damage, and modded (elemental) damage)