it had been awoken from hibernation , it had been scorned , it had been briefly attacked by a variety of mythological and now extinct lifeforms , it had a headache and now , as it entered the great hall , it detected the hat .