function calculateDMG(damage, reduction, flatPen, percentPen) {
    let total = 0;
    reduction *= (1-percentPen);
    reduction -= flatPen;
    total += (damage * 100 / parseFloat((100 + reduction)));
    return total;
}
/**
 * calculates damage done based on reduction
 * @param damage
 * @param reduction -- mr / armor
 * @param penetration -- mag pen, arm pen, leth 
 * does not factor in total damage reduction or percentile conversion like conqueror
 */
calculates damage done based on reduction
@param damage
@param reduction -- mr / armor
@param penetration -- mag pen, arm pen, leth
does not factor in total damage reduction or percentile conversion like conqueror
calculates damage done based on reduction @param damage @param reduction -- mr / armor @param penetration -- mag pen arm pen leth does not factor in total damage reduction or percentile conversion like conqueror
function calculateDMG(damage, reduction, flatPen, percentPen) {
    let total = 0;
    reduction *= (1-percentPen);
    reduction -= flatPen;
    total += (damage * 100 / parseFloat((100 + reduction)));
    return total;
}
function calculateDMG ( damage , reduction , flatPen , percentPen ) { let total = 0 ; reduction *= ( 1 - percentPen ) ; reduction -= flatPen ; total += ( damage * 100 / parseFloat ( ( 100 + reduction ) ) ) ; return total ; }
calculates damage done based on reduction
 @param damage
 @param reduction -- mr / armor
 @param penetration -- mag pen, arm pen, leth
 does not factor in total damage reduction or percentile conversion like conqueror
calculates damage done based on reduction @param damage @param reduction -- mr / armor @param penetration -- mag pen arm pen leth does not factor in total damage reduction or percentile conversion like conqueror