This case was submitted and considered under rule 46 (65 South. vii1), and the opinion of the court was delivered by Mr. Chief Justice ANDERSON:
The counts of the complaint practically embodied the material parts of plea 8 in the case of Burnett v. Ala. Power Co., 74 So. 459,2 and thus, in effect, negatived any right to recover as for a public nuisance in the construction and maintenance of the dam. While some of the counts charged a negligent failure to clear the ground of timber, etc., before the construction of the said dam, they charge that the proximate cause of the injury was from the lawful act of the defendant, and not from the negligence charged. These questions have been fully considered and discussed in the recent cases of Burnett v. Ala. Power Co., supra, and Hamilton v. Alabama Power Co., 195 Ala. 438,70 So. 737, and were decided adversely to the contention of the present appellant. The counts were therefore bad, and were not only subject to the defendant's demurrer, which should have been sustained, but they do not state a cause of action.
Section 3 of the dam act was not intended to give a cause of action not already existing, but merely preserved existing rights as against taking or injuring property. The act was not intended to legalize the construction and maintenance of the dam, and at the same time authorize a recovery of damages upon the theory that a lawful act was a public nuisance.
The complaint does not charge such a taking or injury to property as is covered by section 23 of the Constitution. Nor does it show a right to recover for injuries resulting thereto as covered by section 235 of the Constitution. The injuries complained of did not exist, nor could the damages therefor be ascertained upon the construction of the dam, but arose subsequent thereto and as the result of the maintenance of same in conjunction with subsequent intervening causes. In other words, the injuries complained of were not capable of being ascertained at the time the dam was constructed, or even so reasonably contemplated as to authorize payment or security therefor as provided by said section 235 at the time of the construction or enlargement of the ways, works, etc. See opinion upon the rehearing in the case of Hamilton v. Alabama Power Co., supra, and authorities there cited.
The trial court should have sustained the demurrer to the complaint, as it was not only subject to many of the grounds of the demurrer, but, having incorporated therein facts which showed a complete defense to the grievances complained of, did not state a cause of action. The defendant's fourth plea set up a complete defense to the things complained of as causing injury, but, as the defense seems to have been anticipated and set out and admitted in the complaint, the plea did not therefore traverse the complaint or set up any new matter in avoidance of same, and the trial court should, perhaps, have sustained the demurrer to same. We think, however, that this was error without injury, for, had the said fourth plea been eliminated, and the plaintiff obtained a judgment on his complaint, said judgment would have been void, as it was not supported by a complaint stating a substantial cause of action. True, the trial court held that it did, but this ruling was induced by the plaintiff, and it was incumbent upon him to have such a complaint as would support a judgment, and he cannot procure a reversal of this case upon an error that could have been of no injury to him. L. N. R. R. v. Williams, 113 Ala. 402,21 So. 938; Mayor, etc., v. Kelley, 172 Ala. 336,55 So. 526; Kirkland v. Pilcher, 174 Ala. 172, 57 So. 46. The complaint should not anticipate the defense, and in doing so violates a plain rule of pleading. 4 Ency. Pl. Pr. 614, and cases there cited. Therefore, if the complaint, after stating a good cause of action, anticipates an expected defense, it is liable to demurrer, or, if it states what might be a good cause of action, and then sets up facts which would be a complete defense to same, it would fail to state a cause of action.
The whole complaint is to be considered in determining whether it states a cause of action, as well the allegations which tend to discharge the defendant as those which tend to charge him. Calvo v. Davies, 73 N.Y. 211, 29 Am. Rep. 130; Millette v. Mehmke, 26 Minn. 306, 3 N.W. 700. It is true the Minnesota case supra holds that a complaint does not state a cause of action if it also shows that the same was barred by the statute of limitations, and will not support a judgment by default, while in this state the statute of limitations is waived unless pleaded, that is, in actions at law, and we cannot go the extent of said court; but we think that when a plaintiff, even after stating a good cause of action, proceeds to set up in his complaint a state of facts which would be a complete defense upon the merits to the things set up by him as constituting a cause of action, the whole complaint is to be considered, and when it appears upon the face of same that the plaintiff by averment sets up a complete defense of the things charged in support of a cause of action, the declaration fails to state a substantial cause of action. We think this a fit case for the application of rule 45 (61 South. ix3), and that the nonsuit should not be set aside or vacated.
Counsel for the appellant seems to attach great importance to the case of Richards v. *Page 557 Washington Terminal Co., 233 U.S. 546, 34 Sup. Ct. 654,58 L.Ed. 1088, L.R.A. 1915A, 887. This case was not only unopposed to the present holding, but in part supports the same. The plaintiff there was permitted to recover, upon the theory of a private, and not a public, nuisance; that his injury was so peculiar and different in kind from that sustained by the general public as to amount to a private nuisance, and so affected his property as to amount to a taking under the Fifth Amendment to the federal Constitution. The complaint in question presents no such case.
The judgment of the circuit court is affirmed.
Affirmed. All the Justices concur, except GARDNER, J., who dissents.
1 178 Ala. xix.
2 199 Ala. 337.
3 175 Ala. xxi.