Fix damage calculation for crits and add the 997 (999) damage cap