Angband
player-util.h
Go to the documentation of this file.
1 
20 #ifndef PLAYER_UTIL_H
21 #define PLAYER_UTIL_H
22 
23 #include "player.h"
24 
25 /* Player regeneration constants */
26 #define PY_REGEN_NORMAL 197 /* Regen factor*2^16 when full */
27 #define PY_REGEN_WEAK 98 /* Regen factor*2^16 when weak */
28 #define PY_REGEN_FAINT 33 /* Regen factor*2^16 when fainting */
29 #define PY_REGEN_HPBASE 1442 /* Min amount hp regen*2^16 */
30 #define PY_REGEN_MNBASE 524 /* Min amount mana regen*2^16 */
31 
37 enum
38 {
42 };
43 
47 #define REST_REQUIRED_FOR_REGEN 5
48 
49 void dungeon_change_level(int dlev);
50 void take_hit(struct player *p, int dam, const char *kb_str);
51 void death_knowledge(void);
52 s16b modify_stat_value(int value, int amount);
53 void player_regen_hp(void);
54 void player_regen_mana(void);
55 void player_update_light(void);
56 bool player_can_cast(struct player *p, bool show_msg);
57 bool player_can_study(struct player *p, bool show_msg);
58 bool player_can_read(struct player *p, bool show_msg);
59 bool player_can_fire(struct player *p, bool show_msg);
60 bool player_can_refuel(struct player *p, bool show_msg);
61 bool player_can_cast_prereq(void);
62 bool player_can_study_prereq(void);
63 bool player_can_read_prereq(void);
64 bool player_can_fire_prereq(void);
65 bool player_can_refuel_prereq(void);
67 bool player_confuse_dir(struct player *p, int *dir, bool too);
69 bool player_is_resting(struct player *p);
71 void player_resting_set_count(struct player *p, s16b count);
72 void player_resting_cancel(struct player *p);
74 void player_resting_step_turn(struct player *p);
76 bool player_of_has(struct player *p, int flag);
77 bool player_resists(struct player *p, int element);
78 bool player_is_immune(struct player *p, int element);
79 int coords_to_dir(int y, int x);
80 void player_place(struct chunk *c, struct player *p, int y, int x);
81 void disturb(struct player *p, int stop_search);
82 
83 #endif /* !PLAYER_UTIL_H */