
822 So.2d 708 (2002)
Robert A. BOURGEOIS, Interim Liquidator for the Estate of Alliance Casualty & Reinsurance Company (Barry Karns, Interim Liquidator)
v.
John E. DUNN, Sr. and Eva P. Dunn.
No. 2001 CA 1185.
Court of Appeal of Louisiana, First Circuit.
June 21, 2002.
*709 Bryan D. Scofield, Jason M. Welborn, Lafayette, for Plaintiff/Appellant Barry Karns, Interim Liquidator for the Estate of Alliance Casualty & Reinsurance Company.
Rebel G. Ryland, Columbia, Russell A. Woodard, Monique Thurmon, Ruston, for Defendants/Appellees John E. Dunn, Sr. and Eva P. Dunn.
Before: FITZSIMMONS, DOWNING and LANIER,[1] JJ.
DOWNING, J.
Robert Bourgeois,[2] liquidator for the estate of Alliance Casualty and Reinsurance Company (Alliance), appeals an adverse judgment in a suit he brought against John E. Dunn, Sr. and Eva P. Dunn for breach of contract. The trial court found that Alliance had forfeited its right to collect money under the contract at issue when it ceased its joint effort with the Dunns to pursue judgment and collection against the Grant Parish School Board for damages from the death of the Dunns' child. For the following reasons, we reverse the judgment of the trial court and render judgment.

FACTS AND PROCEDURAL HISTORY
The Dunns' son was killed while boarding a school bus in April 1989 when Alliance's insured, Mr. Crayton Gentry, drove a log truck into him. The Dunns filed a lawsuit against Mr. Gentry, Allied and several other defendants including the Grant Parish School Board alleging these parties negligently caused their son's death.
In June 1990, the Dunns reached a settlement with Alliance whereby Alliance paid its policy limits in full to the Dunns and settled the Dunns' claim against Alliance and their insured. This "Mary Carter"[3] agreement provided that they would jointly pursue the other defendants and that all further recoveries against the remaining defendants would be split equally between Alliance and the Dunns. Alliance and the Dunns successfully settled with one defendant and they split the proceeds equally. They took the remaining defendants to trial, ultimately prevailing in the *710 Third Circuit Court of Appeal.[4] Counsel for Alliance attended the first day of the two-day trial. Counsel for the Dunns prepared and filed their appeal brief without any assistance from Alliance.
One defendant paid its liability, and the Dunns again split the award with Alliance. The Dunns, with Alliance's contractually required consent, later finally settled their claim against the Grant Parish School Board. The Dunns, however, refused to split this recovery asserting that Alliance had failed to jointly pursue this recovery. The Dunns also refused to reimburse Alliance for one-half of the court costs they recouped for the same reason.
Alliance filed its lawsuit against the Dunns to recover one-half the proceeds of the final settlement with the Grant Parish School Board alleging the Dunns breached the terms of the settlement agreement between them. After a trial on the merits, the trial court concluded that there was "inherent unfairness" in allowing Alliance to receive one-half of the proceeds "when it did not continue to work for the cause." The trial court ruled that Alliance had breached the contract and that it had "forfeited its right to collect said money when it ceased its efforts against" the Grant Parish School Board. Judgment was entered accordingly, taxing Alliance with all costs.
Alliance appealed asserting four assignments of error: 1) that the trial court erred in rendering judgment in favor of the Dunns and dismissing their claim; 2) that the trial court erred in refusing to award Alliance one-half of the settlement proceeds pursuant to the agreement between Alliance and the Dunns; 3) that the trial court erred in failing to allow Alliance to recoup one-half of the expenses paid by Alliance; and 4) the trial court erred in assessing costs against Alliance.

DISCUSSION
The trial court committed legal error when it apparently applied an equitable remedy to the contract matter at issue here. A trial court has great discretion in fashioning equitable remedies, but it may do so only when there is no express law applicable. McKee v. Hayward, 97-0553, p. 4 (La.App. 1 Cir. 4/8/98), 710 So.2d 362, 365.
Contracts have the effect of law for the parties. LSA-C.C. art.1983. If the terms are clear, a court will enforce the contract as written, provided the agreement is not contrary to good morals or public policy. First National Bank of Commerce v. City of New Orleans, 555 So.2d 1345, 1348 (La.1990). Parties are free to contract for any object that is lawful, possible, and determined or determinable. LSA-C.C. art.1971.
Here, the settlement agreement between Alliance and the Dunns provided unconditionally that the Dunns expressly assigned, subrogated and transferred to Alliance "any and all right they may have to one-half of any recovery" against the other defendants. The Dunns further agreed unconditionally to pay to Alliance "one-half of the full amount of money, including interest, obtained from any judgment and/or settlement ...." The agreement also provided that the Dunns would jointly pursue the claims against the remaining defendants and that Dunns and Alliance would share all reasonable litigation expenses, including litigation costs on a 50/50 basis.
When the Dunns refused to pay Alliance one-half of the settlement and recouped costs from the final defendant, Alliance *711 filed suit for breach of contract. After the conclusion of the trial, the trial court dismissed Alliance's claim with prejudice and entered judgment in favor of the Dunns, finding that Alliance had forfeited its right to collect the money. The trial court stated that it was persuaded that "an inherent unfairness" existed where Alliance did not work for the cause.
No provision of the agreement calls for forfeiture of any sums due if either party failed to continue to pursue settlement with the remaining defendants. We are aware of no principle of law, and the Dunns cite none, that provides for forfeitures of this type absent agreement between the parties. Under Louisiana's civil law system, specific performance is the preferred remedy for breach of contract. An obligee enjoys the right to demand, insofar as is practicable, the specific performance of the obligation. Lombardo v. Deshotel, 94-1172, p. 5 (La.11/30/94), 647 So.2d 1086, 1090. LSA-C.C. art.1986 provides:
Upon an obligor's failure to perform an obligation to deliver a thing, or not to do an act, or to execute an instrument, the court shall grant specific performance plus damages for delay if the obligee so demands. If specific performance is impracticable, the court may allow damages to the obligee.
Upon a failure to perform an obligation that has another object, such as an obligation to do, the granting of specific performance is at the discretion of the court.
When specific performance is impracticable or when the court, in its discretion, refuses to grant specific performance of an obligation to do, the court may instead fix damages. Lombardo, 94-1172 at pp. 5-6, 647 So.2d at 1090; LSA-C.C. art.1986. Damages are measured by the loss sustained by the obligee and the profit of which he has been deprived. LSA-C.C. art.1995. An obligor in good faith is liable only for the damages that were foreseeable at the time the contract was made. LSA-C.C. art.1996.
Assuming, without deciding, that the trial court was not manifestly erroneous in finding that Alliance had breached its contractual duty to jointly pursue some defendants, the Dunns submitted no evidence into the record that they suffered any damages that would entitle them to any credit or offset against the sums they owe Alliance under the terms of their settlement agreement.
Since the law afforded the Dunns remedies in specific performance and damages, the trial court erred as a matter of law in apparently applying an equitable remedy. See the discussion above. In this regard, we also note that a party seeking equitable relief "must not be pari delicto; that is, he himself must be free from any unlawful or inequitable conduct with respect to the matter or transaction in question." City of New Orleans v. Board of Directors of Louisiana State Museum, 98-1170, p. 15 (La.3/2/99), 739 So.2d 748, 759. In City of New Orleans v. Board of Directors of Louisiana. State Museum, the Supreme Court observed that as a court sitting in equity it would not entertain relief when the party seeking relief pursued a course of conduct calculated to cause the condition necessitating such relief. Id. Here, the Dunns seek damages from Alliance for non-participation in pursuit of damages from the last remaining defendant. We could not equitably grant such relief, even if available, where the alleged harm could have been avoided had the Dunns asked for Alliance's participation and where the Dunns could have sought specific performance at the time the alleged non-participation began.
Accordingly, we find merit in Alliance's assignments of error. We reverse the *712 judgment of the trial court. We render judgment in favor of Alliance and against the Dunns, awarding Alliance seventy-five thousand dollars ($75,000.00) plus accumulated interest as its share of the final settlement from the Grant Parish School Board, awarding Alliance three thousand six hundred fifty-eight and 45/100 dollars ($3,658.45) plus interest from date of demand as reimbursement of its share of recovered costs, and taxing all costs of the underlying lawsuit and this appeal to the Dunns.

DECREE
For reasons stated, we reverse the judgment of the trial court and render judgment. It is ordered, adjudged and decreed that judgment be and is hereby rendered in favor of Alliance and against the Dunns, awarding Alliance seventy-five thousand dollars ($75,000.00) plus accumulated interest as its share of the final settlement from the Grant Parish School Board. It is further ordered, adjudged and decreed that judgment be and is hereby rendered in favor of Alliance and against the Dunns awarding Alliance three thousand six hundred fifty-eight and 45/100 dollars ($3,658.45) plus interest from date of demand as reimbursement of its share of recovered costs. It is further ordered, adjudged and decreed that all costs of the underlying lawsuit be and are hereby taxed to the Dunns. All costs of this appeal are also taxed to the Dunns.
REVERSED AND RENDERED.
FITZSIMMONS, J., concurs and assigns reasons.
FITZSIMMONS, J., concurring and assigning reasons.
I respectfully concur. In "consideration of the ... payment" of $300,000 from Alliance, plaintiffs subrogated to Alliance "any and all rights they may have to one-half of any [future] recovery" obtained from other responsible parties and agreed to pay to Alliance "one-half of the full amount of money ... obtained" from other responsible parties. Thus, the payment by Alliance to plaintiffs completed Alliance's obligation under the agreement, and reserved to them the right to be paid "one-half of any recovery," without further action on the part of Alliance. Additionally, in exchange for the same $300,000, plaintiffs, not Alliance, agreed to "pursue jointly" claims against other parties, and to share "litigation costs and expert fees, on a 50/50 basis ...."
NOTES
[1]  The Honorable Walter I. Lanier, Jr., Judge (retired), First Circuit Court of Appeal, is serving as judge pro tempore by special appointment of the Louisiana Supreme Court.
[2]  In a judgment dated January 10, 2000, Barry Karns replaced Robert Bourgeois as receiver/liquidator for the estate of Alliance.
[3]  The term "Mary Carter" agreement refers to a contract between a plaintiff and one co-defendant, typically containing the following features: (1) secrecy; (2) the contracting defendant remains a party to the suit; (3) the contracting defendant's liability will be reduced proportionately by increasing the liability of its co-defendants; and (4) the contracting defendant guarantees the minimum recovery to the plaintiff. Scoggins v. Frederick, 98-1814 to 98-1816, p. 9 (La.App. 1 Cir. 9/24/99), 744 So.2d 676, 684.
[4]  Dunn v. Gentry, 94-1164 (La.App. 3 Cir. 4/5/95), 653 So.2d 783.
