Angband
mon-lore.h
Go to the documentation of this file.
1 
19 #ifndef MONSTER_LORE_H
20 #define MONSTER_LORE_H
21 
22 #include "z-textblock.h"
23 #include "monster.h"
24 
28 typedef struct
29 {
30  int ridx; /* Index of monster race */
31 
32  s16b sights; /* Count sightings of this monster */
33  s16b deaths; /* Count deaths from this monster */
34 
35  s16b pkills; /* Count monsters killed in this life */
36  s16b tkills; /* Count monsters killed in all lives */
37 
38  byte wake; /* Number of times woken up (?) */
39  byte ignore; /* Number of times ignored (?) */
40 
41  byte drop_gold; /* Max number of gold dropped at once */
42  byte drop_item; /* Max number of item dropped at once */
43 
44  byte cast_innate; /* Max number of innate spells seen */
45  byte cast_spell; /* Max number of other spells seen */
46 
47  struct monster_blow *blows; /* Knowledge of blows */
48 
49  bitflag flags[RF_SIZE]; /* Observed racial flags - a 1 indicates
50  * the flag (or lack thereof) is known to
51  * the player */
52  bitflag spell_flags[RSF_SIZE]; /* Observed racial spell flags */
53 
58 
59  /* Derived known fields, put here for simplicity */
60  bool all_known;
61  bool *blow_known;
63  bool drop_known;
66 } monster_lore;
67 
71 extern monster_lore *l_list;
72 
73 void get_attack_colors(int melee_colors[RBE_MAX], int spell_colors[RSF_MAX]);
74 void lore_append_kills(textblock *tb, const monster_race *race,
75  const monster_lore *lore,
76  const bitflag known_flags[RF_SIZE]);
77 void lore_append_flavor(textblock *tb, const monster_race *race,
78  bool append_utf8);
79 void lore_append_movement(textblock *tb, const monster_race *race,
80  const monster_lore *lore,
81  bitflag known_flags[RF_SIZE]);
82 void lore_append_toughness(textblock *tb, const monster_race *race,
83  const monster_lore *lore,
84  bitflag known_flags[RF_SIZE]);
85 void lore_append_exp(textblock *tb, const monster_race *race,
86  const monster_lore *lore,
87  bitflag known_flags[RF_SIZE]);
88 void lore_append_drop(textblock *tb, const monster_race *race,
89  const monster_lore *lore,
90  bitflag known_flags[RF_SIZE]);
91 void lore_append_abilities(textblock *tb, const monster_race *race,
92  const monster_lore *lore,
93  bitflag known_flags[RF_SIZE]);
94 void lore_append_awareness(textblock *tb, const monster_race *race,
95  const monster_lore *lore,
96  bitflag known_flags[RF_SIZE]);
97 void lore_append_friends(textblock *tb, const monster_race *race,
98  const monster_lore *lore,
99  bitflag known_flags[RF_SIZE]);
100 void lore_append_spells(textblock *tb, const monster_race *race,
101  const monster_lore *lore,
102  bitflag known_flags[RF_SIZE],
103  const int spell_colors[RSF_MAX]);
104 void lore_append_attack(textblock *tb, const monster_race *race,
105  const monster_lore *lore,
106  bitflag known_flags[RF_SIZE],
107  const int melee_colors[RBE_MAX]);
108 void lore_update(const monster_race *race, monster_lore *lore);
109 void cheat_monster_lore(const monster_race *r_ptr, monster_lore *l_ptr);
110 void wipe_monster_lore(const monster_race *r_ptr, monster_lore *l_ptr);
111 void lore_do_probe(struct monster *m);
112 void monster_flags_known(const monster_race *r_ptr, const monster_lore *l_ptr,
114 void lore_treasure(struct monster *m_ptr, int num_item, int num_gold);
115 monster_lore *get_lore(const monster_race *race);
116 bool lore_save(const char *name);
117 
118 #endif /* MONSTER_LORE_H */