… | |
… | |
37 | /* this function checks to see if a spell pushes objects as well |
37 | /* this function checks to see if a spell pushes objects as well |
38 | * as flies over and damages them (only used for cones for now) |
38 | * as flies over and damages them (only used for cones for now) |
39 | * but moved here so it could be applied to bolts too |
39 | * but moved here so it could be applied to bolts too |
40 | * op is the spell object. |
40 | * op is the spell object. |
41 | */ |
41 | */ |
42 | void |
42 | static void |
43 | check_spell_knockback (object *op) |
43 | check_spell_knockback (object *op) |
44 | { |
44 | { |
45 | int weight_move; |
45 | int weight_move; |
46 | int frictionmod = 2; /*poor man's physics - multipy targets weight by this amount */ |
46 | int frictionmod = 2; /*poor man's physics - multipy targets weight by this amount */ |
47 | |
47 | |
… | |
… | |
108 | ***************************************************************************/ |
108 | ***************************************************************************/ |
109 | |
109 | |
110 | /* Causes op to fork. op is the original bolt, tmp |
110 | /* Causes op to fork. op is the original bolt, tmp |
111 | * is the first piece of the fork. |
111 | * is the first piece of the fork. |
112 | */ |
112 | */ |
113 | void |
113 | static void |
114 | forklightning (object *op, object *tmp) |
114 | forklightning (object *op, object *tmp) |
115 | { |
115 | { |
116 | int new_dir = 1; /* direction or -1 for left, +1 for right 0 if no new bolt */ |
116 | int new_dir = 1; /* direction or -1 for left, +1 for right 0 if no new bolt */ |
117 | int t_dir; /* stores temporary dir calculation */ |
117 | int t_dir; /* stores temporary dir calculation */ |
118 | maptile *m; |
118 | maptile *m; |
… | |
… | |
389 | |
389 | |
390 | /* Causes an object to explode, eg, a firebullet, |
390 | /* Causes an object to explode, eg, a firebullet, |
391 | * poison cloud ball, etc. op is the object to |
391 | * poison cloud ball, etc. op is the object to |
392 | * explode. |
392 | * explode. |
393 | */ |
393 | */ |
394 | void |
394 | static void |
395 | explode_bullet (object *op) |
395 | explode_bullet (object *op) |
396 | { |
396 | { |
397 | object *tmp, *owner; |
397 | object *tmp, *owner; |
398 | |
398 | |
399 | if (!op->other_arch) |
399 | if (!op->other_arch) |
… | |
… | |
687 | * CONE RELATED FUNCTIONS |
687 | * CONE RELATED FUNCTIONS |
688 | * |
688 | * |
689 | *****************************************************************************/ |
689 | *****************************************************************************/ |
690 | |
690 | |
691 | /* drops an object based on what is in the cone's "other_arch" */ |
691 | /* drops an object based on what is in the cone's "other_arch" */ |
692 | void |
692 | static void |
693 | cone_drop (object *op) |
693 | cone_drop (object *op) |
694 | { |
694 | { |
695 | object *new_ob = arch_to_object (op->other_arch); |
695 | object *new_ob = arch_to_object (op->other_arch); |
696 | |
696 | |
697 | new_ob->level = op->level; |
697 | new_ob->level = op->level; |
… | |
… | |
1047 | * dir is the direction to look in. |
1047 | * dir is the direction to look in. |
1048 | * range is how far out to look. |
1048 | * range is how far out to look. |
1049 | * type is the type of spell - either SPELL_MANA or SPELL_GRACE. |
1049 | * type is the type of spell - either SPELL_MANA or SPELL_GRACE. |
1050 | * this info is used for blocked magic/unholy spaces. |
1050 | * this info is used for blocked magic/unholy spaces. |
1051 | */ |
1051 | */ |
1052 | object * |
1052 | static object * |
1053 | get_pointed_target (object *op, int dir, int range, int type) |
1053 | get_pointed_target (object *op, int dir, int range, int type) |
1054 | { |
1054 | { |
1055 | object *target; |
1055 | object *target; |
1056 | sint16 x, y; |
1056 | sint16 x, y; |
1057 | int dist, mflags; |
1057 | int dist, mflags; |
… | |
… | |
1244 | * we do this by creating a force and inserting it in the |
1244 | * we do this by creating a force and inserting it in the |
1245 | * object. if time is 0, the object glows permanently. To truely |
1245 | * object. if time is 0, the object glows permanently. To truely |
1246 | * make this work for non-living objects, we would have to |
1246 | * make this work for non-living objects, we would have to |
1247 | * give them the capability to have an inventory. b.t. |
1247 | * give them the capability to have an inventory. b.t. |
1248 | */ |
1248 | */ |
1249 | int |
1249 | static int |
1250 | make_object_glow (object *op, int radius, int time) |
1250 | make_object_glow (object *op, int radius, int time) |
1251 | { |
1251 | { |
1252 | /* some things are unaffected... */ |
1252 | /* some things are unaffected... */ |
1253 | if (op->path_denied & PATH_LIGHT) |
1253 | if (op->path_denied & PATH_LIGHT) |
1254 | return 0; |
1254 | return 0; |