
671 S.W.2d 265 (1984)
Dorothy DETLING, Marte Reading, Glenda Saunders, Janet Corsiglia, and Charlene Davison, Appellants,
v.
C.E. EDELBROCK, Respondent.
No. 65048.
Supreme Court of Missouri, En Banc.
May 15, 1984.
*266 Michael Hufft, Kansas City, for appellants.
*267 Don A. Peterson, Gary L. Smith, James M. Thompson, Kansas City, for respondent.
WELLIVER, Judge.
Appellants appeal from an order of the Circuit Court of Jackson County dismissing their four count first amended petition for failure to state a cause of action. We ordered the cause transferred on respondent's application. Rule 83.03. We review the case as on original appeal. Rule 83.09.
The original proceeding herein was an action brought by tenants seeking (1) specific performance of express and implied covenants of their rental agreement with respondent; (2) appointment of a receiver pursuant to § 441.510, RSMo 1978,[1] to collect and manage rental payments until violations of the Kansas City Property Maintenance and Fire Prevention Codes had been rectified; (3) actual and punitive damages and attorneys fees pursuant to the Merchandising Practices Act, chapter 407. The court ordered the appointment of a receiver, but his efforts to abate the code violations were frustrated by his inability to secure a loan on the property in question. Consequently, the court ordered the receiver only to collect rents and pay utility bills and respondent was ordered to make all necessary repairs in order to rectify the code violations. The Kansas City Public Works Department issued a certificate of occupancy several months later. However, within a few months there were further violations of the Property Maintenance and the Fire Prevention Codes. Most of the tenants vacated the premises as a result of the conditions.
In September 1980, two additional tenants were added as plaintiffs and a first amended petition in four counts was filed by appellants. The pleadings were filed with substantial disregard of Rule 55.04, directing that pleadings shall be "simple, concise and direct." Count I contained forty-five paragraphs, three of which contained a total of forty-five subparagraphs. Counts II, III and IV adopted the prior ninety paragraphs and subparagraphs by reference. Count II added six additional paragraphs, Count III fourteen additional paragraphs and Count IV eight additional paragraphs. From this mass of pleadings it is difficult to identify the legal theory pleaded in the various counts without the aid of the captions supplied by appellants. Count I is designated as negligence per se, Count II breach of implied warranty of habitability, Counts III and IV action for damages under the Merchandising Practices Act. The nine points on appeal and eighty-one pages of brief are as elusive as are the pleadings.
In reviewing the trial court's dismissal of the petition, we must determine if the facts pleaded and the inferences reasonably drawn therefrom demonstrate any ground for relief. We treat the facts averred as true, construe all averments liberally and favorably to appellants and determine whether the pleadings invoke principles of substantive law upon which relief can be granted. Shapiro v. Columbia Union National Bank & Trust Co., 576 S.W.2d 310, 312 (Mo. banc 1978), cert. denied, 444 U.S. 831, 100 S.Ct. 60, 62 L.Ed.2d 40 (1979); Concerned Parents v. Caruthersville School District, 548 S.W.2d 554, 558 (Mo. banc 1977).

I
Respondent contends that dismissal of Count I was proper because recovery for the tort injuries alleged is barred by the landlord tort immunity doctrine. See Knox v. Sands, 421 S.W.2d 497, 501 (Mo.1967); Warner v. Fry, 360 Mo. 496, 228 S.W.2d 729, 730 (1950). Appellants, apparently conceding that the common law rule bars recovery in Count I, urge us to either abrogate the rule or recognize an exception for injuries resulting from a landlord's breach of a municipal housing code.[2]
*268 We need not address these questions because we conclude appellants have not alleged any compensable injuries as a result of respondent's acts or omissions. Appellants first seek damages for their "enormous annoyance, discomfort, frustration, mental anxiety and mental distress." Such damages are, of course, compensable in certain circumstances. At the time appellants filed this petition, our decisions required a plaintiff seeking damages for negligent infliction of mental distress to show that the harm resulted from a contemporaneous physical injury. See Williams v. School District of Springfield, 447 S.W.2d 256, 266 (Mo.1969). Our recent decision in Bass v. Nooney Co., 646 S.W.2d 765 (Mo. banc 1983), abolished the "physical impact rule" and held that damages for mental distress may be recovered when:
(1) the defendant should have realized that his conduct involved an unreasonable risk of causing the distress; and
(2) The emotional distress or mental injury must be medically diagnosable and must be of sufficient severity so as to be medically significant.

Id. at 772-73 (footnote omitted) (emphasis added). A thorough and careful review of appellants' amended petition reveals no allegations that satisfy either the physical injury required by Williams or the medically significant or diagnosable mental injury required by Bass v. Nooney. In Count I appellants also seek damages for "the difference between the amount of rent charged and paid by each plaintiff and the fair rental value of the premises in its defective condition for the term of each plaintiffs' tenancy." Such loss of bargain damages, if proven, result from respondent's breach of his obligations under the lease. Appellants will be adequately compensated for the alleged damages if they prevail in Count II. We decline to undertake a full blown review of the landlord tort immunity doctrine when appellants have available to them an adequate remedy. Count I was properly dismissed.

II
In Count II appellants allege that respondent's failure to correct the claimed housing code violations breached the implied warranty of habitability. This Court previously has not had an opportunity to appraise the status of the warranty of habitability in Missouri,[3] although the Court of Appeals, Western District, recognized such a warranty over a decade ago in King v. Moorehead, 495 S.W.2d 65 (Mo.App.1973). For the reasons set forth below, we conclude that appellants have stated a cause of action in Count II.
At common law a tenant leased property subject to the rule of caveat emptor and the landlord, with certain exceptions, had no duty to maintain and repair rental property or fixtures thereon. Our decision in Turner v. Ragan, 229 S.W. 809 (Mo.1921) exemplifies this traditional learning:
The landlord does not, by making the lease, impliedly warrant that the premises are safe or fit for the use to which the lessee may intend to put them. A rule similar to that of caveat emptor applies. It is the duty of the lessee to examine as to the existence of defects in the premises and to provide against their ill effects.
Id. at 811. The common law rules as applied to leases for residential premises have come under heavy criticism in recent years as being outmoded for contemporary leasing arrangements. As a consequence, courts in many jurisdictions have abrogated the common law rules in favor of an *269 implied warranty of habitability.[4] Several rationales have been advanced for replacing the common law with such a warranty, including: (1) doctrinal changes in the law, including recognition of the contractual nature of modern lease agreements and the trend against caveat emptor in favor of a warranty of fitness in consumer transactions; (2) the widespread enactment of state and local housing regulations establishing minimum community standards of habitability; (3) the tenant's reasonable expectation that property leased for the purpose of human habitation for a designated period of time will be fit for that use for the duration of the lease; and, (4) the belief that tenants lack the means or abilities either to fully inspect modern dwelling units or to maintain the premises during the term of the lease. See King v. Moorehead, supra, at 69-75; Green v. Superior Court, 10 Cal.3d 616, 517 P.2d 1168, 1171-76, 111 Cal.Rptr. 704, 707-712 (1974); Javins v. First National Realty Corp., 428 F.2d 1071, 1074-80 (D.C.Cir.), cert. denied, 400 U.S. 925, 91 S.Ct. 186, 27 L.Ed.2d 185 (1970).
Though we have yet to recognize the warranty of habitability, the law of Missouri has evolved beyond traditional common law precepts in several relevant respects. It is now accepted that a lease is both a conveyance and a contract. See Kamada v. RX Group Ltd., 639 S.W.2d 146, 148 (Mo.App.1982); King v. Moorehead, supra, at 70. Compare State ex rel. St. Louis County v. Evans, 346 Mo. 209, 139 S.W.2d 967, 969 (banc 1940) ("A lease is generally regarded as a conveyance or grant of an estate in real property for a limited term ...") Also, we have rejected caveat emptor in transactions for the purchase of a new home, holding instead that a vendor-builder impliedly warrants the home's fitness for use as a residence. Smith v. Old Warson Development Co., 479 S.W.2d 795 (Mo. banc 1972). In addition, it is common knowledge that counties and municipalities throughout the state have enacted housing and property maintenance codes which impose on property owners, including landlords, responsibilities with respect to the maintenance of property unknown to the common law. Our legislature made it the policy of this state to encourage compliance with local housing and building regulations with the enactment of the Enforcement of Minimum Housing Code Standards Act, §§ 441.510-441.640. The Act creates a state remedy for municipalities and tenants against the owners of buildings failing to meet local housing code standards.
Consideration of many of these developments led the Western District to recognize an implied warranty of habitability in leases for residential property in King v. Moorehead, supra. The concept has been invoked in subsequent decisions. See Wulff v. Washington, 631 S.W.2d 109 (Mo.App.1982); Henderson v. W.C. Haas Realty Management, Inc., 561 S.W.2d 382 (Mo. App.1977); City of St. Louis v. Goldenberg, 529 S.W.2d 33 (Mo.App.1975).
*270 We do not lightly depart from the teachings of the common law, but we are persuaded by the reasoning in King v. Moorehead, supra, and similar decisions, that the time has come to abandon caveat emptor and the "no-repair" rule with respect to leases for residential property. We hold, therefore, that a landlord impliedly warrants the habitability of leased residential property. Specifically, we hold that a landlord warrants
that the dwelling is habitable and fit for living at the inception of the [lease] and that it will remain so during the entire term. [The landlord warrants] that he will provide facilities and service vital to the life, health and safety of the tenant and to the use of the premises for residential purposes.
King v. Moorehead, supra at 75.[5]
Habitability is to be measured by community standards, reflected in most cases in local housing and property maintenance codes. To constitute a breach of the warranty, a tenant must allege and prove conditions of such a nature as to render the premises unsafe or unsanitary. In determining whether the condition constitutes a material breach, courts should consider
[t]he nature of the deficiency or defect, its effect on the life, health or safety of the tenant, length of time it has persisted and the age of the structure. Minor housing code violations which do not affect habitability will be considered de minimis. Also, the violation must affect the tenant's dwelling unit or the common areas which he uses. The tenant is under an obligation to give the landlord notice of the deficiency or defect not known to the landlord and to allow a reasonable time for its correction. The contract principle that a person may not benefit from his own wrong will exonerate a landlord for a defect or deficiency caused by a tenant's wrongful conduct.
King v. Moorehead, supra, at 76. See also Mease v. Fox, 200 N.W.2d 791, 796-97 (Iowa 1972).
Proof of a breach of the warranty of habitability entitles the tenant to pursue traditional contract remedies. King v. Moorehead, supra, at 75-76. Tenants may use a breach of the warranty both as a defense to a landlord's action for possession and rent, see id., and as the basis for an affirmative suit for damages. See Henderson v. W.C. Haas Realty Management, Inc., supra. In cases in the latter category, tenants may seek to recover damages for impaired enjoyment of the premises and consequential damages. King v. Moorehead, supra, at 76; Mease v. Fox, supra, at 797. See generally Annot., 1 A.L.R. 4th 1182 (1980).
Based on the foregoing, we believe a tenant seeking to state a cause of action for breach of the warranty of habitability must allege facts satisfying the following elements: (1) entry into a lease for residential property; (2) the subsequent development of dangerous or unsanitary conditions on the premises materially affecting the life, health and safety of the tenant; (3) reasonable notice of the defects to the landlord; and (4) subsequent failure to restore the premises to habitability.
We believe that appellants have adequately pleaded these elements. Appellants plead that each of them entered into leases for residential apartments owned by respondent; that numerous "material and substantial" violations of the municipal codes affecting their individual apartments, common areas, and central building systems, including roach and rodent infestation, missing screens, exposed wiring, boiler malfunctions, water leakage, rubbish strewn in passageways, and unstable steps, render the leased premises "unsafe, unsanitary, and unfit for human habitation"; that respondent was given reasonable notice of *271 the existence of the defects in the form of citations from municipal building inspectors; and that respondent failed to remedy the defects.
In his motion to dismiss, respondent challenged Count II on the ground that appellants failed to plead properly the provisions of the Property Maintenance Code and the Fire Prevention Code they rely on. Respondent contends that appellants have not pleaded either the terms of the ordinances relied on or the substance of the ordinances, as required by Missouri law. See Hirst v. Ringen Real Estate Co., 169 Mo. 194, 69 S.W. 368, 369 (1902); Schmitt v. City of Hazelwood, 487 S.W.2d 882, 886 (Mo.App.1972). Respondent's contention is without merit. Our decisions have required a party to plead an ordinance either in haec verba or in substance and legal effect when the claim asserted by the party arises from the ordinance. In the instant case, appellants rely on the ordinances only as evidence of the community's standard of habitability. It is well-established that ordinances need not be pleaded with specificity when they are used solely for evidentiary purposes. See State ex rel. Wells v. Mayfield, 365 Mo. 238, 281 S.W.2d 9, 13 (banc 1955); Hart v. Skeets, 346 Mo. 1118, 145 S.W.2d 143, 144 (1940); Bailey v. Kansas City, 189 Mo. 503, 87 S.W. 1182, 1186 (1905).
Respondent argues on appeal that the trial court's dismissal of Count II is sustainable on either of two additional theories: first, that the lease agreement upon which appellants base their claim was illegal from its inception; and second, that appellants' exclusive remedy in continuing to occupy the premise was under the provisions of the Enforcement of Minimum Housing Code Standards Act, §§ 441.500-441.640.
Respondent bases his first claim on § 20.4 of the Kansas City Code, which provides: "It shall be unlawful for any person to: (1) use, occupy or maintain any premises which fails to comply with the requirements of [The Property Maintenance Code] ..." Respondent contends that appellants' lease agreements were illegal from the inception because the defects appellants complained of existed at the time the lease was entered into. Illegality of contract is an affirmative defense which, under Rule 55.08, respondent was obliged to plead responsively. See Parker v. Pine, 617 S.W.2d 536, 542 (Mo.App.1981); McDowell v. Schuette, 610 S.W.2d 29, 36 (Mo. App.1980). Generally, failure to plead an affirmative defense results in waiver of that defense. See Williams v. Irwin-Willert Co., 604 S.W.2d 640, 642 (Mo.App.1980). See also C. Wright & A. Miller, 5 Federal Practice and Procedure § 1278 (1969) (construing Rule 8(c) of the Federal Rules of Civil Procedure which is identical to our Rule 55.08). Respondent answered appellants' amended petition with a motion to dismiss in which the defense was neither raised nor intimated. Furthermore, nothing before us indicates that appellants either impliedly or expressly consented to trying the case on the defense. See Schimmel Fur Co. v. American Indemnity, 440 S.W.2d 932, 939 (Mo.1969); Duncan v. Price, 620 S.W.2d 70, 71 (Mo.App.1981) (consent to the trial of non-pleaded affirmative defenses should not be implied unless it clearly appears that plaintiff tacitly agreed to join the such defense). Having failed to raise the defense in a timely fashion, the defense was waived.
Respondent next contends that the trial court properly dismissed Count II because appellants' exclusive remedy was provided by the Enforcement of Minimum Housing Code Standards Act (Act). Section 441.510 of the Act creates a right of action for municipalities and "[o]ccupants of one-third or more of the dwelling units within a building" in the event "a nuisance exists with respect to the dwelling unit or the building or premises of which the dwelling unit is a part." § 441.510. The rule emerging from our prior decisions is that a statutory right of action shall not be deemed to supersede and displace remedies otherwise available at common law in the absence of language to that effect unless the statutory remedy fully comprehends *272 and envelopes the remedies provided by common law. See Gales v. Weldon, 282 S.W.2d 522, 529 (Mo.1955); Everett v. County of Clinton, 282 S.W.2d 30, 34 (Mo. 1955).
Nothing in the Act indicates to us that the legislature intended it to be the exclusive remedy of tenants occupying subhabitable premises. The statute authorizes only three limited remedies which courts are authorized to order: (1) the payment of present and future rents due from occupants into the court, § 441.570(1); (2) permitting "the owner to draw upon the rents deposited in the court to pay for the cost of necessary repairs ..." § 441.590.1(1); and (3) the appointment of a receiver to administer the rent moneys paid into the court in order to abate the nuisance, § 441.590.1(2). The legislature's authorization of these remedies suggests it desired to establish a statutory mechanism by which a nuisance could be abated through the direct use of the tenant's rent. The creation of such a mechanism is not in itself an adequate substitute for the various existing remedies available at common law or under municipal regulatory schemes for dealing with the abatement of and the damages caused by nuisances. We believe it is clear that the legislature intended the Act to be cumulative of these other remedies.
We conclude that appellants have stated a cause of action for breach of the implied warranty of habitability. The cause therefore must be reversed and remanded.

III
In Counts III and IV appellants allege that respondent's misrepresentations and omissions of material facts at the time they entered their respective rental agreements violates § 407.020 of the Merchandising Practices Act.[6] They seek to recover damages and attorney fees. Section 407.025.1 authorizes private civil actions by
[a]ny person who purchases or leases goods or services primarily for personal, family or household purposes and thereby suffers an ascertainable loss of money or property, real or personal, as a result of the use or employment by another person of a method, act or practice declared unlawful by section 407.020.
(Emphasis added.) Respondent contends that a lease for a residential apartment does not constitute "goods or services" within the meaning of the statute.
The Merchandising Practices Act authorizes the Attorney General to pursue various enumerated remedies in the event of deceptive or fraudulent practices "in connection with the sale or advertisement of any merchandise." § 407.020. "Merchandise" is defined broadly in § 407.010(4) to include "any objects, wares, goods, commodities, intangibles, real estate or services." In contrast, § 407.025 authorizes private civil actions only with respect to any person "who purchases or leases goods or services." § 407.025.1.[7] The legislature *273 specifically excluded real estate transactions from the scope of the private right of action provision. See Schimmer v. H.W. Freeman Construction Co., Inc., 607 S.W.2d 767 (Mo.App.1980). We believe this fact provides persuasive evidence that the legislature did not intend § 407.025.1 to include transactions involving residential rental property.[8] We hold that the trial court properly dismissed Counts III and IV.
The cause is reversed and remanded.
All concur.
NOTES
[1]  All references are to RSMo 1978 unless otherwise indicated.
[2]  Appellants contend on appeal that even if Count I fails to state a cause of action for negligence per se, it adequately pleads a cause of action for the maintenance of a private nuisance. The point is not properly before us since it was not raised before the trial court.
[3]  In Rice v. Lucas, 560 S.W.2d 850 (Mo. banc 1978), an action brought by a landlord for rent and possession of an apartment, the tenant-defendant raised the implied warranty of habitability as both a defense to the plaintiff's action and the basis for a counterclaim for damages. Our decision in Rice addressed only the issue of the constitutionality of § 535.040, RSMo 1969. We noted with respect to the reliance on the implied warranty of habitability that "[t]he appropriatness of this and other defenses and counterclaims raised by tenant ... are not in issue in this case at this time." Id. at 852 n. 1.
[4]  Courts in seventeen jurisdictions have recognized an implied warranty of habitability. California: Green v. Superior Court, 10 Cal.3d 616, 517 P.2d 1168, 111 Cal.Rptr. 704 (1974); District of Columbia: Javins v. First Nat'l Realty Corp., 428 F.2d 1071 (D.C.Cir.), cert. denied, 400 U.S. 925, 91 S.Ct. 186, 27 L.Ed.2d 185 (1970); Hawaii: Lemle v. Breeden, 51 Haw. 426, 462 P.2d 470 (1969); Illinois: Jack Spring, Inc. v. Little, 50 Ill.2d 351, 280 N.E.2d 208 (1972); Indiana: Breezewood Management Co. v. Maltbie, 411 N.E.2d 670 (Ind.App.1980); Iowa: Mease v. Fox, 200 N.W.2d 791 (Iowa 1972); Kansas: Steele v. Latimer, 214 Kan. 329, 521 P.2d 304 (1974); Massachusetts: Boston Housing Auth. v. Hemingway, 363 Mass. 184, 293 N.E.2d 831 (1973); New Hampshire: Kline v. Burns, 111 N.H. 87, 276 A.2d 248 (1971); New Jersey: Marini v. Ireland, 56 N.J. 130, 265 A.2d 526 (1970); New York: Tonetti v. Penati, 48 A.D.2d 25, 367 N.Y. S.2d 804 (1975); Ohio: Glyco v. Schultz, 35 Ohio Misc. 25, 62 Ohio Ops. 459, 289 N.E.2d 919 (Mun.Ct.1972); Pennsylvania: Pugh v. Holmes, 486 Pa. 272, 405 A.2d 897 (1979); Texas: Kamarath v. Bennett, 568 S.W.2d 658 (Tex.1978); Vermont: Birkenhead v. Coombs, 143 Vt. 167, 465 A.2d 244 (1983); Washington: Foisy v. Wyman, 83 Wash.2d 22, 515 P.2d 160 (1973); Wisconsin: Pines v. Perssion, 14 Wis.2d 590, 111 N.W.2d 409 (1961). Recognition of an implied warranty was refused only in Colorado. Blackwell v. Del Bosco, 191 Colo. 344, 558 P.2d 563 (1976).
[5]  Our holding today does not mean a landlord insures the safety and comfort of his or her tenant. As the Supreme Court of California has stated: "This implied warranty of habitability does not require that a landlord ensure that leased premises are in perfect, aesthetically pleasing condition, but it does mean that `bare living requirements' must be maintained." Green v. Superior Court, supra, 517 P.2d at 1182, 111 Cal.Rptr. at 718 (footnote omitted).
[6]  Section 407.020 provides:

The act, use or employment by any person of any deception, fraud, false pretense, false promise, misrepresentation, or the concealment, suppression, or omission of any material fact with intent that others rely upon such concealment, suppression or omission, in connection with the sale or advertisement of any merchandise, is declared to be an unlawful practice ...
Id.
[7]  Appellants contend that § 407.025.1 should be construed to include rental property since "goods or services" are essential components of residential leases. They support their contention with language from King v. Moorehead, quoting Javins v. First National Realty Corp., supra, at 1074:

The urban lessee seeks and expects "a well known package of goods and services  a package which includes not merely walls and ceilings, but also adequate heat, light and ventilation, serviceable plumbing facilities, secure windows and doors, proper sanitation and proper maintenance."
495 S.W.2d at 70. We do not deny that a lease may grant a lessee the right to use articles and wares which, if sold or leased separately might be deemed "goods" within the meaning of the statute. Likewise, a lease may secure a tenant's right to certain services from the landlord. The provision of such matters within the lease, however, does not alter the underlying nature of the transaction, which is the acquisition of the right to use the lessor's real property. To hold otherwise would require us to overlook the fundamental purpose of the leasing transaction in favor of its incidental attributes.
[8]  We are not unaware of decisions from other jurisdictions holding that leases for residential apartments were subject to the state's consumer protection statute. See Commonwealth v. Monumental Properties, Inc., 459 Pa. 450, 329 A.2d 812 (1974); Love v. Pressley, 34 N.C.App. 503, 504, 239 S.E.2d 574 (1977). In each of these cases, the statute prohibited unfair or deceptive practices in the conduct of any "trade or commerce." The language in these statutes is manifestly broader in scope than that in § 407.025. For this reason, we do not believe the cited decisions are persuasive authority.
