Crossfire Server  1.75.0
living.h
Go to the documentation of this file.
1 
6 #ifndef LIVING_H
7 #define LIVING_H
8 
10 enum {
11  STRENGTH = 0,
12  DEXTERITY = 1,
14  WISDOM = 3,
15  CHARISMA = 4,
17  POWER = 6,
18  NUM_STATS = 7
19 };
20 
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 
35 struct living {
36  int8_t Str, Dex, Con, Wis, Cha, Int, Pow;
37  int8_t wc;
38  int8_t ac;
39  int8_t luck;
40  int16_t hp;
41  int16_t maxhp;
42  int16_t sp;
43  int16_t maxsp;
44  int16_t grace;
45  int16_t maxgrace;
46  int16_t dam;
47  int64_t exp;
48  int32_t food;
49 };
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 */
int get_learn_spell(int stat)
Definition: living.cpp:2377
Definition: living.h:14
int get_dex_bonus(int stat)
Definition: living.cpp:2365
int16_t grace
Grace.
Definition: living.h:44
int get_cha_bonus(int stat)
Definition: living.cpp:2361
int16_t maxgrace
Maximum grace.
Definition: living.h:45
Number of statistics.
Definition: living.h:18
int8_t luck
Affects thaco and ac from time to time.
Definition: living.h:39
const char *const statname[NUM_STATS]
Name of stats.
Definition: living.cpp:183
int8_t Con
Use
Definition: living.h:36
const char *const restore_msg[NUM_STATS]
Message when a player has a stat restored.
Definition: living.cpp:150
uint32_t get_weight_limit(int stat)
Definition: living.cpp:2373
#define NROFATTACKS
Definition: attack.h:15
int get_turn_bonus(int stat)
Definition: living.cpp:2385
int16_t sp
Spell points.
Definition: living.h:42
int8_t Dex
Use
Definition: living.h:36
int8_t Wis
Use
Definition: living.h:36
const char *const short_stat_name[NUM_STATS]
Short name of stats.
Definition: living.cpp:194
Definition: living.h:17
int get_thaco_bonus(int stat)
Definition: living.cpp:2369
int16_t dam
How much damage this object does when hitting.
Definition: living.h:46
int get_cleric_chance(int stat)
Definition: living.cpp:2381
Various statistics of objects.
Definition: living.h:35
float get_speed_bonus(int stat)
Definition: living.cpp:2393
int get_fear_bonus(int stat)
Definition: living.cpp:2397
const char *const lose_msg[NUM_STATS]
Message when a player decreases permanently a stat.
Definition: living.cpp:172
int8_t Cha
Use
Definition: living.h:36
int8_t ac
Armor Class, lower AC increases probability of not getting hit.
Definition: living.h:38
int8_t Pow
Use
Definition: living.h:36
int64_t exp
Experience.
Definition: living.h:47
int16_t maxsp
Max spell points.
Definition: living.h:43
int32_t food
How much food in stomach.
Definition: living.h:48
int get_dam_bonus(int stat)
Definition: living.cpp:2389
const char *const drain_msg[NUM_STATS]
Message when a player is drained of a stat.
Definition: living.cpp:139
int16_t maxhp
Max hit points.
Definition: living.h:41
int8_t wc
Weapon Class, lower WC increases probability of hitting.
Definition: living.h:37
int8_t Int
Use
Definition: living.h:36
const char *const attacks[NROFATTACKS]
Attack type names.
Definition: living.cpp:129
int8_t Str
Use
Definition: living.h:36
int16_t hp
Hit Points.
Definition: living.h:40