I won't go into the actual setup of adding the armor to your game other than to say you need to add it like you would any item you are adding to the game. This routine below, handles the effectiveness of the armor differently than most of the tutorials out there. A more practical way of doing things is to handle things as percentages.
::: CODE :::
void TakeDamage (int points,objtype *attacker)
LastAttacker = attacker;
if (gamestate.victoryflag) return;
if (gamestate.difficulty==gd_baby) points>>=2;
If (gamestate.armor >=1)
hpoints = (gamestate.armor * points) / 100;
points -= hpoints;
if (gamestate.armor < 0 ) gamestate.armor = 0;
DrawArmor (); // Your routine to update armors value on status bar
gamestate.health -= points;
gamestate.health = 0;
playstate = ex_died;
killerobj = attacker;
Now that's a little more efficient for Armor and how it should act. So now if the user gets hit with 80 hit points and he has 70 percent armor / 100 percent health... he gets 56 hitpoints on the armor and 24 to his health... Armor is now 14% and 76%.... A much nicer way of handling things and makes the armour both usefull and appropriate.
At least that is how I've been handling hitpoints and the armor in my routines. And should you decide to use this method, as will all tutorials, be them mine or anyone elses, please give credit to the author.
That's only fair...
A complete set of tutorials using both my additions and corrections to others, will be available shortly on the DieHard Wolfers homepage.