During the Spanish War of Succession in 1706, Eugenio of Savoy conquered Milan on behalf of the Holy Roman Emperor, Joseph I. Nothing changed for the castle, except for the nationality of its occupants, and the Sforza era environments continued to fall into ruin and suffer extensive damage, with deterioration of the ceilings, frescoes and stucco decorations. The white statue of Saint John Nepomucene, the Bohemian patron saint of the Austrian army, which was commissioned of Giovanni Dugnani in 1727, is the last vestige of the Austrian occupation in the castle. It was requested by the commander of the fortress Annibale Visconti and can be seen in the Courtyard of Arms near the entrance to the Ducal Courtyard.