In an action for the recovery of specific personal property, if the property has not been delivered to the plaintiff, or the defendant, by his answer, claim a return thereof, the jury, if their verdict be in favor of the plaintiff, or, if being in favor of the defendant, they also find that he is entitled to a return thereof, must find the value of the property, and if so instructed, the value of specific portions thereof, and may at the same time assess the damages, if any are claimed in the complaint or answer, which the prevailing party has sustained by reason of the taking or detention of such property.
SDCL 15-14-23