From what you have written, there is a possibility depending upon the magnitude of the needed repairs to the rental that the landlord refused to make for the tenant that the termination of the tenant's lease could be a case of retaliatiory eviction. The case would be better if the tenant had advised the health department or the building and permit department of problems with the rental and the landlord then terminated the tenant's lease.From what you have written, I cannot make an assessment of the legal validity of the tenant's intended retaliatory eviction case.