function sortType(damage, type, armor, mr) {
    if (type == 0) //phys dmg
        return calculateDMG(damage, armor, 0, 0);
    else if (type == 1) //magic damage
        return calculateDMG(damage, mr, 0, 0);
    else if (type == 2) //true damage
        return damage;
    else if (type == undefined) //too lazy to fix if type isn't defined 
        return damage;
}
/** type sorter
 * @param totalDamage/tickDamage 
 * @param allresists self-explanatory
 */
type sorter
@param totalDamage/tickDamage
@param allresists self-explanatory
type sorter @param totalDamage / tickDamage @param allresists self - explanatory
function sortType(damage, type, armor, mr) {
    if (type == 0) 
        return calculateDMG(damage, armor, 0, 0);
    else if (type == 1) 
        return calculateDMG(damage, mr, 0, 0);
    else if (type == 2) 
        return damage;
    else if (type == undefined) 
        return damage;
}
function sortType ( damage , type , armor , mr ) { if ( type == 0 ) return calculateDMG ( damage , armor , 0 , 0 ) ; else if ( type == 1 ) return calculateDMG ( damage , mr , 0 , 0 ) ; else if ( type == 2 ) return damage ; else if ( type == undefined ) return damage ; }
type sorter
 @param totalDamage/tickDamage
 @param allresists self-explanatory
type sorter @param totalDamage / tickDamage @param allresists self - explanatory
//phys dmg //magic damage //true damage //too lazy to fix if type isn't defined 