If, upon trial of the writ of replevin, the plaintiff shall make good his or her plea for part of the goods replevied, and shall fail to make it good as to the other part, the plaintiff shall have judgment for reasonable damages for the taking and detention of the part adjudged to be plaintiff's, and costs, and the defendant shall have judgment for a return and restoration of the goods and chattels adjudged to defendant, with damages, as provided in § 34-21-10, according to the relative value of such part, and with or without costs at the discretion of the court, but the court shall, in such case, set off the damages recovered by each.
R.I. Gen. Laws § 34-21-11