Final answer:
The text uses a pun as a figure of speech, playing on the word 'soft' to create a humorous effect.
Step-by-step explanation:
The figure of speech used in the text "I got hit in the head by a can of soda. Luckily it was a soft drink." is a pun. A pun is a form of word play that exploits multiple meanings of a term, or similar-sounding words, for an intended humorous or rhetorical effect.
In this case, the pun is on the word soft, which refers to the soft drink being non-alcoholic, as opposed to being physically soft and therefore not causing harm when it hits the head.