Angband
effects.h
Go to the documentation of this file.
1 
19 #ifndef INCLUDED_EFFECTS_H
20 #define INCLUDED_EFFECTS_H
21 
22 #include "source.h"
23 #include "object.h"
24 
25 /* Types of effect */
26 typedef enum
27 {
29  #define EFFECT(x, a, b, c, d, e) EF_##x,
30  #include "list-effects.h"
31  #undef EFFECT
32  EF_MAX
33 } effect_index;
34 
35 /*** Functions ***/
36 
37 void free_effect(struct effect *source);
38 bool effect_valid(const struct effect *effect);
39 bool effect_aim(const struct effect *effect);
40 const char *effect_info(const struct effect *effect);
41 const char *effect_desc(const struct effect *effect);
42 effect_index effect_lookup(const char *name);
43 int effect_subtype(int index, const char *type);
44 bool effect_do(struct effect *effect,
45  struct source origin,
46  struct object *obj,
47  bool *ident,
48  bool aware,
49  int dir,
50  int beam,
51  int boost);
52 void effect_simple(int index,
53  struct source origin,
54  const char *dice_string,
55  int subtype,
56  int radius,
57  int other,
58  int y,
59  int x,
60  bool *ident);
61 
62 #endif /* INCLUDED_EFFECTS_H */
bool effect_valid(const struct effect *effect)
Definition: effects.c:4778
const char * effect_desc(const struct effect *effect)
Definition: effects.c:4807
int other
Extra parameter to be passed to the handler.
Definition: object.h:60
effect_index effect_lookup(const char *name)
Definition: effects.c:4815
const char * effect_info(const struct effect *effect)
Definition: effects.c:4799
int x
X coordinate or distance.
Definition: object.h:57
Definition: effects.h:28
int type
Definition: mon-msg.c:80
int radius
Radius of the effect (if it has one)
Definition: object.h:59
effect_index
Definition: effects.h:26
int y
Y coordinate or distance.
Definition: object.h:56
bool effect_do(struct effect *effect, struct source origin, struct object *obj, bool *ident, bool aware, int dir, int beam, int boost)
Execution of effects
Definition: effects.c:4963
int effect_subtype(int index, const char *type)
Translate a string to an effect parameter subtype index.
Definition: effects.c:4833
int subtype
Projection type, timed effect type, etc.
Definition: object.h:58
basic object structs and enums
bool effect_aim(const struct effect *effect)
Definition: effects.c:4784
Effect.
Definition: object.h:52
void effect_simple(int index, struct source origin, const char *dice_string, int subtype, int radius, int other, int y, int x, bool *ident)
Perform a single effect with a simple dice string and parameters Calling with ident a valid pointer w...
Definition: effects.c:5044
Intialize random names
Definition: init.c:837
Definition: effects.h:141
Definition: source.h:7
int index
Definition: obj-info.c:68
void free_effect(struct effect *source)
Free all the effects in a structure.
Definition: effects.c:4767
List of effects.