Legally, there is no bar or impediment to selling a house while suing the prior owner: because you are the one suing (not being sued), the lawsuit does not have any potential to result  in a lien against the home or otherwise affect its title. Whether news of a lawsuit vs. a prior owner for undisclosed water damage, should word get around somehow, affect you ability to sell or what people might offer, we cannot say--that's something to discuss with your realtor. But can tell you that there is no legal issue.