That seems as intended.
"True" misses, ie. hits that were going to do 0 damage anyway, will still miss, but not reduce bone armor.
Hits that were going to hit will reduce bone armor. They will then generate miss messages as well due to them doing 0 damage.
A mob that truly missed more likely had lower strength, and thus would have done less damage on its attacks as well, so less being removed from bone armor makes sense.
Code:
if(affected_by_spell(victim, SPELL_BONE_ARMOR)) {
bone_armor_rem = victim->player_specials->saved.bone_armor_hp - dam;
// BONE ARMOR ADJUSTMENT HERE
if(bone_armor_rem > 0) { // bone armor takes all of the damage and is still valid
victim->player_specials->saved.bone_armor_hp = bone_armor_rem;
dam = 0;
send_to_char(victim, "Bone Armor At: %d\r\n", victim->player_specials->saved.bone_armor_hp);
} else {
victim->player_specials->saved.bone_armor_hp = 0;
dam = -bone_armor_rem;
affect_from_char(victim, SPELL_BONE_ARMOR);
send_to_char(victim, "Your bone armor has worn out.\r\n");
}
// END BONE ARMOR ADJUSTMENT
}
That dam = line near the bottom should be the way it is in this post, and the way you had it originally, not the way you changed it to after whisky's post, but aside from that I don't see anything suggesting that that wouldn't be working as expected.