Res judicata is not an affirmative defense, it is a legal principle establishing that if an issue has already been litigated in a case it can't be relitigated. Therefore, you would need to file a motion to dismiss and your basis would be on res judicata.
This is not to be considered legal advice nor does an attorney-client relationship exist.
You should have filed your motion to dismiss prior to filing the affirmative defenses. You may need to file a motion for judgment on the pleadings now or a motion for summary judgment to dispose of the matter on the law. Seek some legal help.
The answers given are limited to the facts as given and presumed by the answer itself. Without seeing actual written documentation or having a conference to more fully explore the issues, this short answer has only limited application. Make sure to seek legal counsel and provide all documentation to get assistance in making informed legal choices. Bstein@dcfsz.com, 305 377 1505