now is in a very ruinous condition". The parapets had collapsed, the ramparts could easily be scaled and the ditches were filled with brambles. Little was done to remedy this, however, until the 1730s, when the castle was extensively modernised. The interior was redesigned, the ramparts were rebuilt and the castle's guns were replaced, incorporating new 18-pounder cannons. During the American Revolutionary War, France allied itself with the revolutionaries, causing war with Britain to break out in 1778. The French Revolutionary and Napoleonic Wars followed, during which period Falmouth became an important military depot. In 1795, the Crown purchased the castle's land from the Killigrew family, and reinforced the fortress to deal with the fresh threat of invasion. The government installed more guns and built a new gun position called the Half-Moon Battery just outside the 16th-century walls; the landward defences of Pendennis were reinforced, and a new barracks and other ancillary buildings were built inside the fortress. At its peak, the castle was equipped with up to 48 artillery pieces. A new volunteer unit of artillery was formed in Falmouth to support the forts around the harbour, many of them carrying out training using Pendennis's guns before then deploying elsewhere across Cornwall. After the end of the Napoleonic Wars in 1815, Pendennis was neglected; many of its guns became unserviceable and some buildings fell into ruin. The old post of captain of Pendennis Castle was abolished in 1837, with the fortification commanded by a conventional military appointment. In the 1850s, renewed fears of a French invasion led to investment in new artillery at the castle, and nineteen 32- and 56-pounder (14.5 and 24.5 kg) guns were installed. Falmouth continued to be an important harbour, particularly for the Royal Navy. When new concerns about France emerged, an electrically operated minefield was laid across Carrick Roads in 1885, jointly controlled from Pendennis and St Mawes. New 6- and 12-pounder (2.7 and 5.4 kg) quick-firing guns, supported by machine-guns for close defence, were assigned to the castle to deal with the emerging threat from enemy torpedo boats. 20th–21st centuries The 105th Regiment Royal Garrison Artillery took over the manning of Pendennis Castle in 1902. A new barracks was built to house them, and a signal station was constructed on top of the old keep to coordinate operations with shipping, while the 16th-century guardhouse alongside the keep was demolished. The castle was reinforced