A Question Concerning Copyright

Okay, here's wondering something. I'm no law student, see.

If I were to have a character that was clearly based on/a reference to a copyrighted character, (In my case as part of a short comical Easter egg) would this be allowed? The character wouldn't ACTUALLY be the one I'm referencing, and while it wouldn't actually be said, it'd be obvious as a reference.

Is this illegal? I don't want to be arrested for trying to be funny.
You will be arrested. One time I referenced Super Mario during a conversation with my local commissar in the politburo, and I spent seven years in the gulag for referencing copyrighted characters of the decadent capitalist swine. If you are going to do it anyway my suggestion is to get good at laying bricks and cement in sub zero temperatures and developing a taste for rice in soup water with bits of fish bone.

Original thread: https://www.hbgames.org/forums/viewtopic.php?t=71230