The structure
typedef struct liv { /* several stats here */ } living;
is found in the file server/include/living.h .
It contains the various “statistics” that are visible to the player in the client .
/** * Various statistics of objects. */ typedef struct liv { sint8 Str, Dex, Con, Wis, Cha, Int, Pow; sint8 wc; /**< Weapon Class, how skilled, the lower the better. */ sint8 ac; /**< Armour Class, how hard to hit, the lower the better. */ sint8 luck; /**< Affects thaco and ac from time to time */ sint16 hp; /**< Hit Points. */ sint16 maxhp; /**< Max hit points. */ sint16 sp; /**< Spell points. Used to cast mage spells. */ sint16 maxsp; /**< Max spell points. */ sint16 grace; /**< Grace. Used to invoke clerical prayers. */ sint16 maxgrace; /**< Maximum grace. Used to invoke clerical prayers. */ sint16 dam; /**< How much damage this object does when hitting */ sint64 exp; /**< Experience. Killers gain 1/10. */ sint32 food; /**< How much food in stomach. 0 = starved. */ } living;
Type: sint8
Meaning:
Type: sint8
Meaning:
Type: sint8
Meaning:
Type: sint8
Meaning:
Type: sint8
Meaning:
Type: sint8
Meaning:
Type: sint8
Meaning:
Type: sint8
Comment: Weapon Class, how skilled, the lower the better.
Meaning:
Type: sint8
Comment: Armour Class, how hard to hit, the lower the better.
Meaning:
Type: sint8
Comment: Affects thaco and ac from time to time
Meaning:
Type: sint16
Comment: Hit Points.
Meaning:
Type: sint16
Comment: Max hit points.
Meaning:
Type: sint16
Comment: Spell points. Used to cast mage spells.
Meaning:
Type: sint16
Comment: Max spell points.
Meaning:
Type: sint16
Comment: Grace. Used to invoke clerical prayers.
Meaning:
Type: sint16
Comment: Maximum grace. Used to invoke clerical prayers.
Meaning:
Type: sint16
Comment: How much damage this object does when hitting
Meaning:
Type: sint64
Comment: Experience. Killers gain 1/10.
Meaning:
Type: sint16
Comment: How much food in stomach. 0 = starved.
Meaning:
* for player, food. * for healing spells, food to give to the player. * for swamps, how deep the player is in the swamp (see move_deep_swamp()). * FIXME type * for FORCEs, duration (in object moves) of the force. * for WAND, number of charges left. * for DISEASEs, the duration of the disease. * for GATEs, whether it's opening or closing.