It's still early yet, but I'm working on fantasy novel. To cut a long story short, it features characters from Earth in a fresh fantasy setting, and one of the cast is a bit of nerdy and inclined to make little side comments and compare stuff in the world to fantasy cliches.
Thing is, I'm planning to get this work published and sold for profit and the references to other works are likely to be minor and many. How far can I go before I have to worry about getting sued?
My major inspiration would be the comic book 'Scot Pilgrim Vs the World' with things like its '+2 vs blonds' bats Dungeons and Dragons reference, and other nods to gaming and nerdy things.