Most of the damage to Heidelberg Castle happened because the Germans suffered a crushing defeat at the hands of the French.
http://www.zum.de/whkmla/military/17cen/17cenindex.html
Pick a war, any war, Sooner or later they're bound to get one right!......