Item Repair

Repair (also known as Item Repair is a Warrior class skill in Diablo I, given at the start of the game.

General Information
When used, Repair instantly restores an item's durability, but also decreases maximum durability, by no less than 1 point. If an item reaches 0 maximum durability in result, it is broken and permanently lost, though in fact, any item will be eventually lost from continuous field repairs.

Because of the penalty, it is generally considered a useless skill. Lowering an item's maximum durability also increases the risks that the item would break and be lost. In nearly every situation, it is better to return to Tristram to repair gear, and only a dire need of emergency repair on higher difficulties, of extreme lack of gold, can justify its use.

It is considerably more useful in Diablo: Hellfire, thanks to the Blacksmith Oils, as one may use those to increase the maximum durability. Even then, though, they're not always there to help restore the item. Regardless, the decrease in maximum durability is probably the reason neither class in subsequent games possesses a repair skill: such mechanic is by definition imbalanced if it does not have a negative effect, and useless if it does.

Item durability can also be increased via Hidden Shrine.

Item Repair doesn't cost any gold or Mana, and does not decrease the item's selling cost. Beyond the very first levels, when the player might change gear on a regular basis, it will not save any real repair expenses.

Item will always lose at least 1 point of maximum durability, regardless of how damaged it is, the higher Character Level, the less this penalty. A sword worn down to 2/50 would be replenished to 49/49, for example. It cannot be used on fully repaired item.

Durability calculation algorithm:
 * 1) Set X = 0
 * 2) Add (Character Level + Random [1 - Character Level] ) to X
 * 3) Set Y = [Maximum Durability / (Character Level + 9)], if less than 1 set to 1
 * 4) Decreases Maximum Durability by Y
 * 5) If X + Current Durability < Maximum Durability, GOTO 3
 * 6) Set Current Durability = Maximum Durability
 * 7) If maximum durability reaches 0, the item is destroyed.

Lore
The extended periods of time that most Warriors spend away from their homes and civilization requires that they learn to repair their own weapons and armor, although their skill is no match for the talent of a true blacksmith.