Most courts won't help you unless you can prove misrepresentation, or unpermitted work. It is the buyer's responsibility to get a good home inspection and insurance against problems like you have. A licensed inspector can usually spot bad work, plus they carry insurance to cover bad problems they miss. I realize this won't help you now, but looking into the permits issue may help. Even that could backfire though. You'd have to prove who did the work, the previous owner, or one or two before that.