(c) On and after July 1, 1998, the rights and remedies of tenant for a violation of this section by the landlord shall include those available pursuant to Sections 1942, 1942.4, and 1942.5, an action for breach of contract, and an action for injunctive relief pursuant to Section 526 of the Code of Civil Procedure. Additionally, in an unlawful detainer action, after a default in the payment of rent, a tenant may raise the violation of this section as an affirmative defense and shall have a right to the remedies provided by Section 1174.2 of the Code of Civil Procedure.