When damages are claimed for withholding the property recovered, upon which permanent improvements have been made by a defendant or those under whom the defendant claims, holding under color of title adversely to the claims of the plaintiff, in good faith, the value of such improvements shall be allowed as a setoff against such damages.
NRS 40.040