Hitting Yourself in Combat (3.5e Variant Rule)
From D&D Wiki
Hitting Yourself in Combat
When rolling an attack roll, on a roll of a natural 1, There is a chance that instead of automatically missing, you hit yourself. On a roll of a natural 1, reroll your attack roll against your own AC, if it hits you take your normal weapon damage, if it misses, treat it as a normal miss. You can score a critical on yourself but can not take any damage based on precision (such as sneak attack and insightful strike).