If it is an old problem and not too bad, then let an home inspector look at it first, then buy it with a deep discount.
If it is bad, or a developing problem, well, be very carefull. I would buy at the lot price minus demolition cost.
If it is bad, or a developing problem, well, be very carefull. I would buy at the lot price minus demolition cost.