Many royal and baronial castles were left to decline, so that by the 15th century only a few were maintained for defensive purposes. A small number of castles in England and Scotland were developed into Renaissance Era palaces that hosted lavish feasts and celebrations amid their elaborate architecture. Such structures were, however, beyond the means of all but royalty and the richest of the late-medieval barons. Although gunpowder weapons were used to defend castles from the late 14th century onwards it became clear during the 16th century that, provided artillery could be transported and brought to bear on a besieged castle, gunpowder weapons could also play an important attack role. The defences of coastal castles around the British Isles were improved to deal with this threat, but investment in their upkeep once again declined at the end of the 16th century. Nevertheless, in the widespread civil and religious conflicts across the British Isles during the 1640s and 1650s, castles played a key role in England. Modern defences were quickly built alongside existing medieval fortifications and, in many cases, castles successfully withstood more than one siege. In Ireland the introduction of heavy siege artillery by Oliver Cromwell in 1649 brought a rapid end to the utility of castles in the war, while in Scotland the popular tower houses proved unsuitable for defending against civil war artillery – although major castles such as Edinburgh put up strong resistance. At the end of the war many castles were slighted to prevent future use.