Go to the documentation of this file.
22 #include "source.h"
23 #include "object.h"
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;
35 /*** Functions ***/
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 int recharge_failure_chance(const struct object *obj, int strength);
63 #endif /* INCLUDED_EFFECTS_H */
bool effect_valid(const struct effect *effect)
Definition: effects.c:5218
const char * effect_desc(const struct effect *effect)
Definition: effects.c:5247
int other
Extra parameter to be passed to the handler.
Definition: object.h:60
effect_index effect_lookup(const char *name)
Definition: effects.c:5255
const char * effect_info(const struct effect *effect)
Definition: effects.c:5239
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
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:5431
int effect_subtype(int index, const char *type)
Translate a string to an effect parameter subtype index.
Definition: effects.c:5273
int subtype
Projection type, timed effect type, etc.
Definition: object.h:58
int recharge_failure_chance(const struct object *obj, int strength)
Returns N which is the 1 in N chance for recharging to fail.
Definition: effects.c:2322
basic object structs and enums
bool effect_aim(const struct effect *effect)
Definition: effects.c:5224
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:5512
Intialize random names
Definition: init.c:847
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:5204
List of effects.