I’ve read the documentation about armor, I’ve looked at the " The Reliques of Tolti-Aph" example by Graham Nelson. I’ve looked at some of the conversations here, and I cannot for the life of me figure out how to get the armor working. I want the armor being worn to decrease the amount of damage a person receives (the player and anyone else in the game that is defined as a person). I have the combat mechanics working just fine EXCEPT for the armor part. So it’s just the armor addition that I need help with. The bolded part is what I can’t figure out.
Here is what I have:
The attacking it with action has a number called the damage inflicted.
**A protection is a kind of thing. A protection is wearable. A protection has a number called maximum resistance.**
**Carry out calculating maximum damage of a person (called the actor):**
** if the actor is wearing protection and the damage inflicted is greater than 1:**
** say ": [the protection] absorbs ";**
** let the absorbency be the maximum resistance of the protection;**
** if the absorbency >= the damage inflicted:**
** let the absorbency be the damage inflicted;**
** decrease the absorbency by 1;**
** decrease the damage inflicted by the absorbency;**
** say the absorbency;**
** continue the activity.**