| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
#ifndef LIVING_H |
| 7 |
#define LIVING_H |
| 8 |
|
| 9 |
|
| 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 |
| 19 |
}; |
| 20 |
|
| 21 |
|
| 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 |
|
| 34 |
|
| 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 |