anchor.diff:        [Items.GetNameThe(FItem), FItem.Durability, FItem.MaxDurability]),
         clAlarm));
     Items_Inventory_SetItem(Index, FItem);
  -  if (FItem.Durability = 0) then
  -  begin
  -    Items_Inventory_DeleteItem(Index, FItem);
  -    MsgLog.Add(Terminal.Colorize(Format(_('%s been ruined irreversibly.'),
  -      [Items.GetNameThe(FItem)]), clAlarm));
  -  end;
  +  RnItem(FItem, Index);
     Self.Calc;
   end;
   
  
positive.code:       MsgLog.Add(_('You need more gold.'));
        Exit;
      end;
      FItem.Durability := FItem.MaxDurability;
      if ((Items_Inventory_DeleteItemAmount(Ord(ivGold), RepairCost) > 0) and
        (Items_Inventory_SetItem(Index, FItem) > 0)) then
        MsgLog.Add(Format(_('You repaired %s (-%d gold).'),
          [Items.GetNameThe(FItem), RepairCost]));
    end;
    Self.Calc;
  end;
  
negative.code:   uShop, BearLibTerminal, uAbility, uAffixes, uAttribute, uSpellbook, uUI,
    uBearLibItemsCommon, uBearLibItemsDungeon, uBearLibItemsInventory;
  
  procedure RnItem(FItem: Item; const Index: Integer);
  begin
    if (FItem.Durability = 0) then
    begin
      Items_Inventory_DeleteItem(Index, FItem);
      MsgLog.Add(Terminal.Colorize(Format(_('%s been ruined irreversibly.'),
        [Items.GetNameThe(FItem)]), clAlarm));
    end;
  end;
  
  { TPlayer }
  
  // Generate a random background (from Kharne roguelike)
  