Chapter 5. Counterclaims.
§ 13–501. Counterclaim by way of set-off as an action by defendant.
In a civil action, a defendant who files a counterclaim by way of set-off shall be deemed to have brought an action at the time of filing the counterclaim for the matters mentioned therein.
§ 13–502. Effect of assignment.
When cross-demands have existed between persons under such circumstances that if one had brought an action against the other a counterclaim could have been pleaded, neither can be deprived of the benefit thereof by an assignment by the other; but in an action by the assignee of a nonnegotiable debt the defendant may set off by counterclaim any indebtedness to him of the assignor, existing before notice of the assignment, as well as any indebtedness to him of the plaintiff.
§ 13–503. Action against principal and sureties.
In an action against principal and sureties, an indebtedness of the plaintiff to the principal may be set off by counterclaim as if he were the sole defendant. When the indebtedness so set off exceeds the plaintiff’s demand, the judgment for the excess shall be in favor of the defendant who is sued as principal.
§ 13–504. Action by trustee.
When the plaintiff in a civil action is trustee for another, or has no actual interest in the contract on which the action is founded, a demand against the plaintiff may not be pleaded by way of counterclaim, but a demand against the person whom he represents or for whose benefit the action is brought may be pleaded.
§ 13–505. Action by or against executor or administrator.
In an action against an executor or administrator, in his representative capacity, the defendant may plead, by way of counterclaim, a demand belonging to the decedent where he would have been entitled to rely upon the demand in an action against him; and in an action brought by an executor or administrator, in his representative capacity, a demand against the decedent, belonging at the time of his death to the defendant, may be pleaded by way of counterclaim, as if the action had been brought by the decedent in his lifetime.