These formations were essentially immune to the attacks of mounted men-at-arms as long as the knights obligingly threw themselves on the spear wall and the foot soldiers remained steady under the morale challenge of facing a cavalry charge, but the closely packed nature of pike formations rendered them vulnerable to enemy archers and crossbowmen who could shoot them down with impunity, especially when the pikemen did not have adequate armor. Many defeats, such as at Roosebeke and Halidon Hill, were suffered by the militia pike armies when faced by cunning foes who employed their archers and crossbowmen to thin the ranks of the pike blocks before charging in with their (often dismounted) men-at-arms.