A discrete model for coupled environmental and mechanical degradation in historic masonry structures