Angband
obj-slays.h
Go to the documentation of this file.
1 
18 #ifndef OBJECT_SLAYS_H
19 #define OBJECT_SLAYS_H
20 
21 #include "monster.h"
22 
26 struct slay_cache {
27  struct brand *brands; /* Brands */
28  struct slay *slays; /* Slays */
29  s32b value; /* Value of this combination */
30 };
31 
32 
33 /*** Functions ***/
34 void copy_slay(struct slay **dest, struct slay *source);
35 void copy_brand(struct brand **dest, struct brand *source);
36 void free_slay(struct slay *source);
37 void free_brand(struct brand *source);
38 bool append_random_brand(struct brand *current, char **name);
39 bool append_random_slay(struct slay *current, char **name);
40 int brand_count(struct brand *brands);
41 int slay_count(struct slay *slays);
42 struct brand *brand_collect(const object_type *obj1, const object_type *obj2,
43  int *total, bool known);
44 struct slay *slay_collect(const object_type *obj1, const object_type *obj2,
45  int *total, bool known);
46 void object_notice_brands(object_type *o_ptr, const monster_type *m_ptr);
47 void object_notice_slays(object_type *o_ptr, const monster_type *m_ptr);
48 void improve_attack_modifier(object_type *o_ptr, const monster_type *m_ptr,
49  const struct brand **brand_used,
50  const struct slay **slay_used,
51  char *verb, bool real, bool known_only);
52 bool react_to_slay(struct object *obj, const struct monster *mon);
53 void wipe_brands(struct brand *brands);
54 void wipe_slays(struct slay *slays);
57 bool fill_slay_cache(const object_type *obj, s32b value);
58 void free_slay_cache(void);
59 
60 #endif /* OBJECT_SLAYS_H */