Modeling core-hole screening in core-excitation spectroscopies