Crossfire Server, Trunk
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 */
living::exp
int64_t exp
Definition: living.h:47
living::maxhp
int16_t maxhp
Definition: living.h:41
get_weight_limit
uint32_t get_weight_limit(int stat)
Definition: living.cpp:2369
statname
const char *const statname[NUM_STATS]
Definition: living.cpp:183
get_turn_bonus
int get_turn_bonus(int stat)
Definition: living.cpp:2381
restore_msg
const char *const restore_msg[NUM_STATS]
Definition: living.cpp:150
living::Dex
int8_t Dex
Definition: living.h:36
lose_msg
const char *const lose_msg[NUM_STATS]
Definition: living.cpp:172
CHARISMA
@ CHARISMA
Definition: living.h:15
get_dam_bonus
int get_dam_bonus(int stat)
Definition: living.cpp:2385
NROFATTACKS
#define NROFATTACKS
Definition: attack.h:17
get_learn_spell
int get_learn_spell(int stat)
Definition: living.cpp:2373
WISDOM
@ WISDOM
Definition: living.h:14
drain_msg
const char *const drain_msg[NUM_STATS]
Definition: living.cpp:139
get_fear_bonus
int get_fear_bonus(int stat)
Definition: living.cpp:2393
short_stat_name
const char *const short_stat_name[NUM_STATS]
Definition: living.cpp:194
get_thaco_bonus
int get_thaco_bonus(int stat)
Definition: living.cpp:2365
get_dex_bonus
int get_dex_bonus(int stat)
Definition: living.cpp:2361
POWER
@ POWER
Definition: living.h:17
living::dam
int16_t dam
Definition: living.h:46
living::food
int32_t food
Definition: living.h:48
living::sp
int16_t sp
Definition: living.h:42
get_speed_bonus
float get_speed_bonus(int stat)
Definition: living.cpp:2389
living::Int
int8_t Int
Definition: living.h:36
DEXTERITY
@ DEXTERITY
Definition: living.h:12
living
Definition: living.h:35
attacks
const char *const attacks[NROFATTACKS]
Definition: living.cpp:129
living::wc
int8_t wc
Definition: living.h:37
living::maxgrace
int16_t maxgrace
Definition: living.h:45
living::Wis
int8_t Wis
Definition: living.h:36
get_cha_bonus
int get_cha_bonus(int stat)
Definition: living.cpp:2357
living::maxsp
int16_t maxsp
Definition: living.h:43
living::Cha
int8_t Cha
Definition: living.h:36
STRENGTH
@ STRENGTH
Definition: living.h:11
living::ac
int8_t ac
Definition: living.h:38
living::grace
int16_t grace
Definition: living.h:44
get_cleric_chance
int get_cleric_chance(int stat)
Definition: living.cpp:2377
INTELLIGENCE
@ INTELLIGENCE
Definition: living.h:16
living::Pow
int8_t Pow
Definition: living.h:36
NUM_STATS
@ NUM_STATS
Definition: living.h:18
living::hp
int16_t hp
Definition: living.h:40
living::luck
int8_t luck
Definition: living.h:39
CONSTITUTION
@ CONSTITUTION
Definition: living.h:13
living::Con
int8_t Con
Definition: living.h:36
living::Str
int8_t Str
Definition: living.h:36