1 | /* |
1 | /* |
2 | * static char *rcsid_spell_attack_c = |
2 | * static char *rcsid_spell_attack_c = |
3 | * "$Id: spell_attack.C,v 1.3 2006/08/15 16:19:55 elmex Exp $"; |
3 | * "$Id: spell_attack.C,v 1.5 2006/08/26 23:36:34 root Exp $"; |
4 | */ |
4 | */ |
5 | |
5 | |
6 | |
6 | |
7 | /* |
7 | /* |
8 | CrossFire, A Multiplayer game for X-windows |
8 | CrossFire, A Multiplayer game for X-windows |
… | |
… | |
137 | if (OB_TYPE_MOVE_BLOCK(tmp, GET_MAP_MOVE_BLOCK(m, sx, sy))) |
137 | if (OB_TYPE_MOVE_BLOCK(tmp, GET_MAP_MOVE_BLOCK(m, sx, sy))) |
138 | return; |
138 | return; |
139 | |
139 | |
140 | /* OK, we made a fork */ |
140 | /* OK, we made a fork */ |
141 | new_bolt = get_object(); |
141 | new_bolt = get_object(); |
142 | |
|
|
143 | copy_object(tmp,new_bolt); |
142 | copy_object(tmp,new_bolt); |
144 | |
143 | |
145 | /* reduce chances of subsequent forking */ |
144 | /* reduce chances of subsequent forking */ |
146 | new_bolt->stats.Dex -= 10; |
145 | new_bolt->stats.Dex -= 10; |
147 | tmp->stats.Dex -= 10; /* less forks from main bolt too */ |
146 | tmp->stats.Dex -= 10; /* less forks from main bolt too */ |
… | |
… | |
409 | } |
408 | } |
410 | |
409 | |
411 | // elmex Tue Aug 15 17:46:51 CEST 2006: Prevent explosions of any kind on safe maps |
410 | // elmex Tue Aug 15 17:46:51 CEST 2006: Prevent explosions of any kind on safe maps |
412 | // NOTE: If this breaks something important: remove this. I can't think of anything |
411 | // NOTE: If this breaks something important: remove this. I can't think of anything |
413 | // bad at the moment that might happen from this. |
412 | // bad at the moment that might happen from this. |
414 | if (get_map_flags (op->map, NULL, op->x, op->y, NULL, NULL) & P_SAFE_MAP) |
413 | if (get_map_flags (op->map, NULL, op->x, op->y, NULL, NULL) & P_SAFE) |
415 | { |
414 | { |
416 | remove_ob (op); |
415 | remove_ob (op); |
417 | free_object (op); |
416 | free_object (op); |
418 | return; |
417 | return; |
419 | } |
418 | } |
… | |
… | |
933 | } |
932 | } |
934 | |
933 | |
935 | // elmex Tue Aug 15 17:46:51 CEST 2006: Prevent bomb from exploding |
934 | // elmex Tue Aug 15 17:46:51 CEST 2006: Prevent bomb from exploding |
936 | // on a safe map. I don't like this special casing, but it seems to be neccessary |
935 | // on a safe map. I don't like this special casing, but it seems to be neccessary |
937 | // as bombs can be carried. |
936 | // as bombs can be carried. |
938 | if (get_map_flags (op->map, NULL, op->x, op->y, NULL, NULL) & P_SAFE_MAP) |
937 | if (get_map_flags (op->map, NULL, op->x, op->y, NULL, NULL) & P_SAFE) |
939 | { |
938 | { |
940 | remove_ob (op); |
939 | remove_ob (op); |
941 | free_object (op); |
940 | free_object (op); |
942 | return; |
941 | return; |
943 | } |
942 | } |