This could be written more cleanly as:

    if ( !( u.has_bionic("bio_ears") || u.is_wearing("ear_plugs") || u.is_wearing("hat_noise_cancelling") ) &&
        rng( (vol - dist) / 2, (vol - dist) ) >= 150) {

Or it won't work properly.