Although I have not researched the issue, a transfer in the ownership should not affect your adverse possession claim. The new owner only received what the seller conveyed - which was a property with a adverse possessor in place. You would file against the present owner.
If this answer was helpful, please mark it as helpful or as a best answer. This answer is for general education purposes only. It neither creates an attorney-client relationship nor provides legal guidance or advice. The answer is based on the limited information provided and the answer might be different had additional information been provided. You should consult an attorney.
Adverse possession means that you possessed someone else's property for the required period of time. If the required period elapsed before the foreclosure, there is no reason to be concerned about the foreclosure. If it did not, then you are most likely still ok.
Keep in mind that adverse possession is not the same as title. All you have is the right to file a lawsuit and be heard by the judge. If the judge thinks you are right, then, and only then, do you have title to the property. Until the judgment issues, all you have is a claim.
You should consult a lawyer to bring your claim as soon as possible.
My answers are general in nature based upon very short, and often incomplete questions. Please do not rely upon my answers. If you need a legal opinion, you need to hire a lawyer who will take the time to fully understand your problem and then take the time to research the issues.
You can always file the claim. Whether the facts will support your claim is another story. You file in Supreme Court in the county in which the property lies. To be successful you must be able to prove that you had possession of the premises adverse to the owners interest. In other words open and notorious use for a continuous period of at least ten years. For example, you lived there, maintained the property, paid the taxes and utilities as if you owned it openly for an uninterrupted period of at least 10 years. Sometimes the period has to be 20 years. Also that during that period no one else made any claim to ownership or disputed your right to occupy the premises. If you can prove all of that then you may be able to gain ownership by adverse possession. This is very technical in nature and you should not attempt to pursue this matter on your own. Consult an experienced real estate litigator.
This e-mail may contain confidential or privileged information. If you are not the intended recipient, please notify the sender immediately by return e-mail and delete this e-mail and all copies and attachments. If you are not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. IRS Circular 230 Notice: Unless specifically stated otherwise, any tax advice contained in this communication (including any attachments) is not intended or written to be used, and cannot be used, for the purpose of (i) avoiding penalties under the Internal Revenue Code or (ii) promoting, marketing or recommending to another party any transaction or matter addressed herein. Unless specifically stated otherwise, this communication shall not be deemed to be legal or tax advice, and no attorney-client relationship shall be deemed to have been created.