and then a raven that had been circling the castles battlements swooped down and alighted on the princes right shoulder , where it proceeded to snap its long black beak at the helmets plume as if it were a moulting chick .