1560 {
1561 int attachment_count = GetInventory().AttachmentCount();
1562 if (attachment_count > 0)
1563 {
1564 int random_pick = Math.RandomInt(0, attachment_count);
1565 ItemBase attachment =
ItemBase.Cast(GetInventory().GetAttachmentFromIndex(random_pick));
1566 if (!attachment.IsExplosive())
1567 {
1568 attachment.AddHealth("","",damage);
1569 return true;
1570 }
1571 }
1572 return false;
1573 }