(g) (1) If a landlord breaches the warranty of habitability under this section and refuses to make the repairs or correct the conditions, or if after a reasonable time the landlord has failed to do so, the tenant may:
(i) Bring an action for damages and the abatement of rent against the landlord; and
(ii) Refuse to pay rent and raise the existence of the asserted defects or conditions as an affirmative defense to an action of distress for rent or to any other action brought by the landlord to recover rent or the possession of the leased premises.
(2) Multiple tenants may join as plaintiffs in an action under this subsection in accordance with the Maryland Rules on joinder.
(3) The remedies under this subsection are in addition to any other remedies provided by law.
(h) It is a defense to a claim under this section that:
(1) The tenant, the tenant’s family, agent, employees, assignees, or social guests caused the asserted defects or conditions; or
(2) The landlord or the landlord’s agents were denied reasonable and appropriate entry for the purpose of correcting or repairing the asserted conditions or defects.
(i) The court shall make appropriate findings of fact and issue any order that the justice of the case may require, including ordering any of the following:
(1) An award of actual damages;
(2) An abatement of rent due and unpaid; or
(3) The termination of the lease, return of any unused portion of a security deposit to the tenant, and relocation expenses for a tenant.
(j) If a court orders any relief to a tenant who brings an action under this section, the tenant may recover reasonable:
(1) Attorney’s fees and costs; and
(2) Expenses related to litigation.