Debian Codegraph @

include/living.h

raw symbols SCIP
1 /**
2 * @file
3 * Structure containing object statistics.
4 */
5
6 #ifndef LIVING_H
7 #define LIVING_H
8
9 /** Object statistics. */
10 enum {
11 STRENGTH = 0,
12 DEXTERITY = 1,
13 CONSTITUTION = 2,
14 WISDOM = 3,
15 CHARISMA = 4,
16 INTELLIGENCE = 5,
17 POWER = 6,
18 NUM_STATS = 7 /**< Number of statistics. */
19 };
20
21 /** Maximum level a player can reach. */
22 #define MAXLEVEL 115
23
24 extern const char *const attacks[NROFATTACKS];
25
26 extern const char *const restore_msg[NUM_STATS];
27 extern const char *const statname[NUM_STATS];
28 extern const char *const short_stat_name[NUM_STATS];
29 extern const char *const drain_msg[NUM_STATS];
30 extern const char *const lose_msg[NUM_STATS];
31
32 /**
33 * Various statistics of objects.
34 */
35 typedef struct liv {
36 int8_t Str, Dex, Con, Wis, Cha, Int, Pow;
37 int8_t wc; /**< Weapon Class, how skilled, the lower the better. */
38 int8_t ac; /**< Armour Class, how hard to hit, the lower the better. */
39 int8_t luck; /**< Affects thaco and ac from time to time */
40 int16_t hp; /**< Hit Points. */
41 int16_t maxhp; /**< Max hit points. */
42 int16_t sp; /**< Spell points. Used to cast mage spells. */
43 int16_t maxsp; /**< Max spell points. */
44 int16_t grace; /**< Grace. Used to invoke clerical prayers. */
45 int16_t maxgrace; /**< Maximum grace. Used to invoke clerical prayers. */
46 int16_t dam; /**< How much damage this object does when hitting */
47 int64_t exp; /**< Experience. Killers gain 1/10. */
48 int32_t food; /**< How much food in stomach. 0 = starved. */
49 } living;
50
51 int get_cha_bonus(int stat);
52 int get_dex_bonus(int stat);
53 int get_thaco_bonus(int stat);
54 uint32_t get_weight_limit(int stat);
55 int get_learn_spell(int stat);
56 int get_cleric_chance(int stat);
57 int get_turn_bonus(int stat);
58 int get_dam_bonus(int stat);
59 float get_speed_bonus(int stat);
60 int get_fear_bonus(int stat);
61
62 #endif /* LIVING_H */