In actions other than those specified in sections 28-26-07, 28-26-08, and 28-26-09, costs may be allowed for or against either party in the discretion of the court. In all actions, when there are several defendants not united in interest and making separate defenses by separate answers and the plaintiff fails to recover judgment against all, the court may award costs to such of the defendants as have judgment in their favor.
N.D.C.C. § 28-26-10