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(struct effect *effect);
39 bool effect_aim(struct effect *effect);
40 const char *effect_info(struct effect *effect);
41 const char *effect_desc(struct effect *effect);
42 effect_index effect_lookup(const char *name);
43 int effect_param(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 p1,
56  int p2,
57  int p3,
58  bool *ident);
59 
60 #endif /* INCLUDED_EFFECTS_H */
bool effect_valid(struct effect *effect)
Definition: effects.c:4314
void effect_simple(int index, struct source origin, const char *dice_string, int p1, int p2, int p3, bool *ident)
Perform a single effect with a simple dice string and parameters Calling with ident a valid pointer w...
Definition: effects.c:4548
effect_index effect_lookup(const char *name)
Definition: effects.c:4351
Definition: effects.h:28
int type
Definition: mon-msg.c:79
const char * effect_info(struct effect *effect)
Definition: effects.c:4335
const char * effect_desc(struct effect *effect)
Definition: effects.c:4343
effect_index
Definition: effects.h:26
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:4470
int effect_param(int index, const char *type)
Translate a string to an effect parameter index.
Definition: effects.c:4369
basic object structs and enums
bool effect_aim(struct effect *effect)
Definition: effects.c:4320
Effect.
Definition: object.h:52
Intialize random names
Definition: init.c:658
Definition: effects.h:130
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:4303
List of effects.