Ok added this:
Code:
if(affected_by_spell(ch, SPELL_BONE_ARMOR)) {
bone_armor_rem = ch->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
ch->player_specials->saved.bone_armor_hp = bone_armor_rem;
dam = 0;
send_to_char(ch, "Bone Armor At: %d\r\n", ch->player_specials->saved.bone_armor_hp);
} else {
ch->player_specials->saved.bone_armor_hp = 0;
dam = -bone_armor_rem;
affect_from_char(ch, SPELL_BONE_ARMOR);
send_to_char(ch, "Your bone armor has worn out.\r\n");
}
// END BONE ARMOR ADJUSTMENT
}
But as you Can see on attached pic, the first 2 hits mob makes on me, is absorbed, but bone armor goes from 154 Down to 100. But the mob only damaged me 28 and 24 = 52 and not 54 ?
Then i miss it 3 times, and the bone armor is reduced each time. Bone armor should only drop, when someone hit me. Not when i hit it.
So something is wrong, i just cant see what.
Any ideas ?