You can't just patent any random game mechanics you might be able to think of, but nothing in patent law categorically precludes patenting them. I don't recall the details, but Wizards of the Coast infamously had a patent on a specific combination of mechanics in Magic: The Gathering, which led to several card games carefully constructed to not infringe the patent in question. This typically took the form of all cards in the game being included in a single box instead of random packs, but in at least one case a company produced a pointed parody in which the instructions told players to not to assemble decks from randomly allocated cards and then "tap" them for resources because that would be patent infringement.