1701. In the case of total loss or alienation of property subject to restitution, the person liable to make the restitution is bound to return the value of the property, considered when it was received, or at the time of its loss or alienation, or at the time of its restitution, whichever value is the lowest, or, if the person is in bad faith or if the restitution is due to his fault, whichever value is the highest.
If the property has perished by superior force, however, the debtor is exempt from making restitution, but he shall then assign to the creditor, as the case may be, the indemnity he has received for the loss of the property or, if he has not already received it, the right to the indemnity. If the debtor is in bad faith or if the restitution is due to his fault, he is not exempt from making restitution unless the property would also have perished if it had been in the hands of the creditor.