No, there are no fixed rules governing figurative language in books. Authors freely choose devices—metaphors, similes, personification, alliteration, etc.—to achieve their desired effect. The only “rule” is effectiveness: the device should enhance clarity, emotion, or artistry.