version 1.6 | | version 1.7 |
---|
| | |
/* | | /* |
* static char *rcsid_spell_attack_c = | | * static char *rcsid_spell_attack_c = |
* "$Id: spell_attack.c,v 1.6 2004/02/24 05:43:58 mwedel Exp $"; | | * "$Id: spell_attack.c,v 1.7 2004/02/26 06:17:28 mwedel Exp $"; |
*/ | | */ |
| | |
| | |
| | |
int mood_change(object *op, object *caster, object *spell) { | | int mood_change(object *op, object *caster, object *spell) { |
object *tmp, *god, *head; | | object *tmp, *god, *head; |
int done_one, range, mflags, level, at, best_at; | | int done_one, range, mflags, level, at, best_at; |
sint16 x, y; | | sint16 x, y, nx, ny; |
mapstruct *m; | | mapstruct *m; |
char *race; | | char *race; |
| | |
| | |
| | |
done_one=0; | | done_one=0; |
m = op->map; | | m = op->map; |
mflags = get_map_flags(m, &m, x, y, &x, &y); | | nx = x; |
| | ny = y; |
| | mflags = get_map_flags(m, &m, x, y, &nx, &ny); |
if (mflags & P_OUT_OF_MAP) continue; | | if (mflags & P_OUT_OF_MAP) continue; |
| | |
/* If there is nothing living on this space, no need to go further */ | | /* If there is nothing living on this space, no need to go further */ |
| | |
/* If a monster was effected, put an effect in */ | | /* If a monster was effected, put an effect in */ |
if (done_one && spell->other_arch) { | | if (done_one && spell->other_arch) { |
tmp = arch_to_object(spell->other_arch); | | tmp = arch_to_object(spell->other_arch); |
tmp->x = x; | | tmp->x = nx; |
tmp->y = y; | | tmp->y = ny; |
insert_ob_in_map(tmp, m, op, 0); | | insert_ob_in_map(tmp, m, op, 0); |
} | | } |
} /* for y */ | | } /* for y */ |