(a) All contracts founded in whole or in part on a gambling consideration are void. Any person who has paid any money or delivered any thing of value lost upon any game or wager may recover such money, thing, or its value by an action commenced within six months from the time of such payment or delivery.
(b) Any other person may also recover the amount of such money, thing, or its value by an action commenced within 12 months after the payment or delivery thereof for the use of the wife or, if no wife, the children or, if no children, the next of kin of the loser.
(c) A judgment under either subsection (a) or (b) for the amount of money paid, thing delivered, or its value is a good defense to any action brought for such money, thing, or its value under the provisions of the other subsection.
(d) A judgment recovered under the provisions of this section is a defense to any proceeding on any garnishment served after the recovery of such judgment, and the court may make any order staying proceedings as may be necessary to protect the rights of the defendant.