16 #define ELEM(a) PROJ_##a, 19 #define PROJ(a) PROJ_##a, 103 int resist,
bool actual);
107 const struct object *protected_obj);
109 bool *did_hit,
bool *was_obvious);
121 bool project(
struct source origin,
int rad,
struct loc finish,
int dam,
int typ,
122 int flg,
int degrees_of_arc,
byte diameter_of_source,
123 const struct object *obj);
Spell types used by project() and related functions.
char * blind_desc
Definition: project.h:34
int adjust_dam(struct player *p, int type, int dam, aspect dam_aspect, int resist, bool actual)
Adjust damage according to resistance or vulnerability.
Definition: project-player.c:44
char * lash_desc
Definition: project.h:35
int index
Definition: project.h:29
int msgt
Definition: project.h:40
char * desc
Definition: project.h:32
wchar_t proj_to_char[PROJ_MAX][BOLT_MAX]
Definition: project.c:40
char * name
Definition: project.h:30
struct loc origin_get_loc(struct source origin)
The main project() function and its helpers
Definition: project.c:382
Element struct.
Definition: project.h:28
uint8_t byte
Definition: h-basic.h:167
bool project_p(struct source, int r, struct loc grid, int dam, int typ, int power)
Called from project() to affect the player.
Definition: project-player.c:794
struct projection * next
Definition: project.h:43
void project_m(struct source, int r, struct loc grid, int dam, int typ, int flg, bool *did_hit, bool *was_obvious)
Called from project() to affect monsters.
Definition: project-mon.c:1275
int color
Definition: project.h:42
random_value denominator
Definition: project.h:37
byte proj_to_attr[PROJ_MAX][BOLT_MAX]
Definition: project.c:39
int inven_damage(struct player *p, int type, int cperc)
Destroys a type of item on a given percent chance.
Definition: project-obj.c:40
char * type
Definition: project.h:31
void thrust_away(struct loc centre, struct loc target, int grids_away)
Thrust the player or a monster away from the source of a projection.
Definition: project-mon.c:83
const char ** p[]
Definition: name.c:40
struct projection * projections
Definition: project.c:33
int proj_name_to_idx(const char *name)
Definition: project.c:60
A struct representing a strategy for making a dice roll.
Definition: z-rand.h:40
bool projectable(struct chunk *c, struct loc grid1, struct loc grid2, int flg)
Determine if a bolt spell cast from grid1 to grid2 will arrive at the final destination, assuming that no monster gets in the way, using the project_path() function to check the projection path.
Definition: project.c:348
char * player_desc
Definition: project.h:33
bool project_f(struct source, int r, struct loc grid, int dam, int typ)
Called from project() to affect terrain features.
Definition: project-feat.c:679
int damage_cap
Definition: project.h:39
bool project(struct source origin, int rad, struct loc finish, int dam, int typ, int flg, int degrees_of_arc, byte diameter_of_source, const struct object *obj)
Generic "beam"/"bolt"/"ball" projection routine.
Definition: project.c:552
bool project_o(struct source, int r, struct loc grid, int dam, int typ, const struct object *protected_obj)
Called from project() to affect objects.
Definition: project-obj.c:502
int project_path(struct loc *gp, int range, struct loc grid1, struct loc grid2, int flg)
Projection paths
Definition: project.c:123
aspect
Random aspects used by damcalc, m_bonus_calc, and ranvals.
Definition: z-rand.h:55
Intialize random names
Definition: init.c:843
Most of the "player" information goes here.
Definition: player.h:489
bool obvious
Definition: project.h:41
const char * proj_idx_to_name(int type)
Definition: project.c:71
int numerator
Definition: project.h:36
int divisor
Definition: project.h:38
Write value lines for a set of modifiers.