Okay, lessee... for armor, start at the body part you are checking. If it the part the item is being worn on, or it is a lower body and it's parent is the part the item is being worn on, then it gets the main blocking number.
Otherwise, does the part have a descendant that is a stance point as does not have an intervening upper/lower body? Stance points determine whether it's upper or lower (UBSTEP or LBSTEP). Stance points must be connected through [LIMB]s to the part for the stance point to be recognized as relevant.
We still need to check if the part is related to the item at all. Go up the part's ancestors, counting steps (do not count steps as you pass through bodies). If you hit the parent, good, use that number, plus whether it is "lower" or not, and compare it to the proper steps variable. However, if you pass through an UPPER/LOWERBODY on the way, and then aren't in one, you aren't related to the armor item, and it bails. If you do something odd like attach a lower body to another lower body which is attached to the upper body the item is on, I think it will respond poorly, covering any legs attached to the lower-lower body, but not covering the lower-lower body itself, so bodies attached to bodies attached to bodies aren't supported yet as far as armor goes.
In short, armor protects an upper body and any attached lower body with the main number, as well as any other attached non-bodies attached to the bodies, without intervening bodies. Descendant stance points determine if UBSTEP or LBSTEP is used.
I tested this a bit back when I added it, and a few times since then, but there might also be problems of course.
So if I'm reading the code right and haven't missed anything, if you have a bipedal creature with wings and a tail, the wings will be covered by [UBSTEP:<N>] if N>=1, and the tail is the same way, even though it goes up through a lower body first, since it has no stance point. If you add a foot on the end of the tail, you'd use [LBSTEP:<N>], N>=1 instead. Extra limbs are all covered as regular limbs. Quadrupeds would have their "arms" covered by LBSTEP instead of UBSTEP.