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 typedef struct liv {
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 } 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 */
liv::dam
int16_t dam
Definition: living.h:46
get_weight_limit
uint32_t get_weight_limit(int stat)
Definition: living.c:2362
statname
const char *const statname[NUM_STATS]
Definition: living.c:184
get_turn_bonus
int get_turn_bonus(int stat)
Definition: living.c:2374
liv::maxgrace
int16_t maxgrace
Definition: living.h:45
liv::wc
int8_t wc
Definition: living.h:37
liv::Str
int8_t Str
Definition: living.h:36
restore_msg
const char *const restore_msg[NUM_STATS]
Definition: living.c:151
liv::maxhp
int16_t maxhp
Definition: living.h:41
lose_msg
const char *const lose_msg[NUM_STATS]
Definition: living.c:173
liv::hp
int16_t hp
Definition: living.h:40
CHARISMA
@ CHARISMA
Definition: living.h:15
get_dam_bonus
int get_dam_bonus(int stat)
Definition: living.c:2378
NROFATTACKS
#define NROFATTACKS
Definition: attack.h:17
get_learn_spell
int get_learn_spell(int stat)
Definition: living.c:2366
WISDOM
@ WISDOM
Definition: living.h:14
drain_msg
const char *const drain_msg[NUM_STATS]
Definition: living.c:140
liv::maxsp
int16_t maxsp
Definition: living.h:43
liv::luck
int8_t luck
Definition: living.h:39
liv::exp
int64_t exp
Definition: living.h:47
get_fear_bonus
int get_fear_bonus(int stat)
Definition: living.c:2386
short_stat_name
const char *const short_stat_name[NUM_STATS]
Definition: living.c:195
get_thaco_bonus
int get_thaco_bonus(int stat)
Definition: living.c:2358
get_dex_bonus
int get_dex_bonus(int stat)
Definition: living.c:2354
liv::Cha
int8_t Cha
Definition: living.h:36
POWER
@ POWER
Definition: living.h:17
liv::Con
int8_t Con
Definition: living.h:36
liv::food
int32_t food
Definition: living.h:48
get_speed_bonus
float get_speed_bonus(int stat)
Definition: living.c:2382
liv::Int
int8_t Int
Definition: living.h:36
DEXTERITY
@ DEXTERITY
Definition: living.h:12
liv
Definition: living.h:35
attacks
const char *const attacks[NROFATTACKS]
Definition: living.c:130
living
struct liv living
get_cha_bonus
int get_cha_bonus(int stat)
Definition: living.c:2350
liv::Dex
int8_t Dex
Definition: living.h:36
liv::Wis
int8_t Wis
Definition: living.h:36
liv::grace
int16_t grace
Definition: living.h:44
STRENGTH
@ STRENGTH
Definition: living.h:11
liv::ac
int8_t ac
Definition: living.h:38
get_cleric_chance
int get_cleric_chance(int stat)
Definition: living.c:2370
INTELLIGENCE
@ INTELLIGENCE
Definition: living.h:16
liv::sp
int16_t sp
Definition: living.h:42
NUM_STATS
@ NUM_STATS
Definition: living.h:18
liv::Pow
int8_t Pow
Definition: living.h:36
CONSTITUTION
@ CONSTITUTION
Definition: living.h:13