Dynamic response of a damaging masonry wall