174 if (--op->
range < 0) {
267 if (--op->
range <= 0) {
277 new_x = op->
x+
DIRX(op);
278 new_y = op->
y+
DIRY(op);
330 for (i = 1; i < 9; i++) {
369 LOG(
llevError,
"Tried to move_cone object %s without a map.\n", op->
name ? op->
name :
"unknown");
403 if (--op->
range < 0) {
408 for (i = -1; i < 2; i++) {
445 if (env->
map == NULL)
461 for (i = 1; i < 9; i++) {
498 if (op->
range-- <= 0) {
506 new_x = op->
x+
DIRX(op);
507 new_y = op->
y+
DIRY(op);
527 if (!op->
direction || (mflags&P_OUT_OF_MAP)) {
552 if (op != NULL && op->
map) {
555 "You feel something fizzle inside you.", NULL);
569 int i, j, dam_save, dir, mflags;
589 for (i = 1; i < 9; i++) {
594 int offset = ((i^j)&1) ? (i/2) : -(i/2);
623 for (j = 0; j < 9; j++) {
679 static int cardinal_adjust[9] = { -3, -2, -1, 0, 0, 0, 1, 2, 3 };
680 static int diagonal_adjust[10] = { -3, -2, -2, -1, 0, 0, 1, 2, 2, 3 };
681 sint16 target_x, target_y, origin_x, origin_y;
682 int basedir, adjustdir;
687 if (op->
duration == 0 || owner == NULL || owner->
x != op->
x || owner->
y != op->
y) {
697 basedir =
rndm(1, 8);
705 adjustdir = cardinal_adjust[
rndm(0, 8)];
707 adjustdir = diagonal_adjust[
rndm(0, 9)];
768 if (env == NULL || env->
map == NULL) {
780 for (i = 1; i < 9; i++) {
883 int num_sections = 1;
898 for (tmp2 = tmp; tmp2 != NULL; tmp2 = tmp2->
more)
911 if (
rndm(0, weight_move-1) > ((tmp->
weight/num_sections)*frictionmod)) {
int get_map_flags(mapstruct *oldmap, mapstruct **newmap, sint16 x, sint16 y, sint16 *nx, sint16 *ny)
archetype * find_archetype(const char *name)
void enter_exit(object *op, object *exit_ob)
void save_throw_object(object *op, uint32 type, object *originator)
void merge_spell(object *op, sint16 x, sint16 y)
sstring add_refcount(sstring str)
method_ret common_pre_ob_move_on(object *trap, object *victim, object *originator)
int fire_arch_from_position(object *op, object *caster, sint16 x, sint16 y, int dir, object *spell)
object * object_get_env_recursive(object *op)
static void move_bolt(object *op)
int fire_bullet(object *op, object *caster, int dir, object *spob)
void free_string(sstring str)
#define MSG_TYPE_SPELL_FAILURE
#define SET_ANIMATION(ob, newanim)
short freearr_x[SIZEOFFREE]
void draw_ext_info(int flags, int pri, const object *pl, uint8 type, uint8 subtype, const char *message, const char *oldmessage)
static void animate_bomb(object *op)
void check_spell_expiry(object *spell)
method_ret ob_process(object *op)
static void explosion(object *op)
void cone_drop(object *op)
int reflwall(mapstruct *m, int x, int y, object *sp_op)
struct archt * other_arch
int ok_to_put_more(mapstruct *m, sint16 x, sint16 y, object *op, uint32 immune_stop)
#define SP_WORD_OF_RECALL
short freearr_y[SIZEOFFREE]
void check_bullet(object *op)
int rndm(int min, int max)
static void move_aura(object *aura)
void remove_ob(object *op)
static void check_spell_knockback(object *op)
const char * materialname
void register_move_on(int ob_type, move_on_func method)
static void move_swarm_spell(object *op)
int hit_map(object *op, int dir, uint32 type, int full_hit)
object * get_owner(object *op)
static method_ret spell_effect_type_move_on(ob_methods *context, object *trap, object *victim, object *originator)
#define OB_TYPE_MOVE_BLOCK(ob1, type)
#define GET_MAP_MOVE_BLOCK(M, X, Y)
int on_same_map(const object *op1, const object *op2)
#define QUERY_FLAG(xyz, p)
object * insert_ob_in_ob(object *op, object *where)
object * get_object(void)
void explode_bullet(object *op)
object * insert_ob_in_map(object *op, mapstruct *m, object *originator, int flag)
void copy_owner(object *op, object *clone)
static void move_cone(object *op)
static void move_bullet(object *op)
void common_post_ob_move_on(object *trap, object *victim, object *originator)
static method_ret spell_effect_type_process(ob_methods *context, object *op)
static void forklightning(object *op, object *tmp)
#define NUM_ANIMATIONS(ob)
void update_turn_face(object *op)
int move_object(object *op, int dir)
int out_of_map(mapstruct *m, int x, int y)
void register_process(int ob_type, process_func method)
static void move_missile(object *op)
void init_type_spell_effect(void)
void update_ob_speed(object *op)
#define GET_MAP_OB(M, X, Y)
void LOG(LogLevel logLevel, const char *format,...)
#define was_destroyed(op, old_tag)
void copy_object(object *op2, object *op)
void free_object(object *ob)
int spell_find_dir(mapstruct *m, int x, int y, object *exclude)
object * arch_to_object(archetype *at)
static void move_ball_spell(object *op)
int hit_player(object *op, int dam, object *hitter, uint32 type, int full_hit)
static void execute_word_of_recall(object *op)