Angband
player-timed.h
Go to the documentation of this file.
1 
20 #include "player.h"
21 
25 #define PY_FOOD_MAX 17000 /* Food value (Bloated) */
26 #define PY_FOOD_FULL 10000 /* Food value (Normal) */
27 #define PY_FOOD_ALERT 2000 /* Food value (Hungry) */
28 #define PY_FOOD_WEAK 1000 /* Food value (Weak) */
29 #define PY_FOOD_FAINT 500 /* Food value (Fainting) */
30 #define PY_FOOD_STARVE 100 /* Food value (Starving) */
31 
35 enum {
39 };
40 
44 enum
45 {
46  #define TMD(a, b, c, d, e, f, g, h, i, j) TMD_##a,
47  #include "list-player-timed.h"
48  #undef TMD
49  TMD_MAX
50 };
51 
52 typedef struct {
53  const char *on_begin;
54  const char *on_end;
55  const char *on_increase;
56  const char *on_decrease;
57  u32b flag_redraw, flag_update;
58  int msg;
59  int fail_code;
60  int fail;
61 } timed_effect;
62 
63 int timed_name_to_idx(const char *name);
64 const char *timed_idx_to_name(int type);
65 int timed_protect_flag(int type);
66 bool player_set_timed(struct player *p, int idx, int v, bool notify);
67 bool player_inc_timed(struct player *p, int idx, int v, bool notify,
68  bool check);
69 bool player_dec_timed(struct player *p, int idx, int v, bool notify);
70 bool player_clear_timed(struct player *p, int idx, bool notify);
71 bool player_set_food(struct player *p, int v);
72