====== Living ===== The structure typedef struct liv { /* several stats here */ } living; is found in the file [[:server:include:living.h|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; ---- ===== List of Fields == ==== Str ==== Type: sint8 Meaning: ==== Dex ==== Type: sint8 Meaning: ==== Con ==== Type: sint8 Meaning: ==== Wis ==== Type: sint8 Meaning: ==== Cha ==== Type: sint8 Meaning: ==== Int ==== Type: sint8 Meaning: ==== Pow ==== Type: sint8 Meaning: ---- ==== wc ==== Type: sint8 Comment: Weapon Class, how skilled, the lower the better. Meaning: ==== ac ==== Type: sint8 Comment: Armour Class, how hard to hit, the lower the better. Meaning: ==== luck ==== Type: sint8 Comment: Affects thaco and ac from time to time Meaning: ---- ==== hp ==== Type: sint16 Comment: Hit Points. Meaning: * for living things, hitpoints (<0 => dead). * for exits, x coordinates of destination. * for ROD or HORNs, spellpoints the item has to cast the spell. ==== maxhp ==== Type: sint16 Comment: Max hit points. Meaning: ==== sp ==== Type: sint16 Comment: Spell points. Used to cast mage spells. Meaning: * for player, spellpoints. * for exits, y coordinates of destination. * for glowing crystals, stored spellpoints. * for WEAPON_IMPROVER, what to improve * for PLAYERMOVER, the direction to move objects ==== maxsp ==== Type: sint16 Comment: Max spell points. Meaning: ==== grace ==== Type: sint16 Comment: Grace. Used to invoke clerical prayers. Meaning: ==== maxgrace ==== Type: sint16 Comment: Maximum grace. Used to invoke clerical prayers. Meaning: ---- ==== dam ==== Type: sint16 Comment: How much damage this object does when hitting Meaning: ==== exp ==== Type: sint64 Comment: Experience. Killers gain 1/10. Meaning: * added speed for some items? ==== food ==== 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.