1 | |
|
|
2 | /* |
|
|
3 | * static char *rcsid_spell_attack_c = |
|
|
4 | * "$Id: spell_attack.C,v 1.10 2006/09/10 23:24:12 root Exp $"; |
|
|
5 | */ |
|
|
6 | |
|
|
7 | |
|
|
8 | /* |
1 | /* |
9 | CrossFire, A Multiplayer game for X-windows |
2 | CrossFire, A Multiplayer game for X-windows |
10 | |
3 | |
11 | Copyright (C) 2002-2003 Mark Wedel & Crossfire Development Team |
4 | Copyright (C) 2002-2003 Mark Wedel & Crossfire Development Team |
12 | Copyright (C) 1992 Frank Tore Johansen |
5 | Copyright (C) 1992 Frank Tore Johansen |
… | |
… | |
23 | |
16 | |
24 | You should have received a copy of the GNU General Public License |
17 | You should have received a copy of the GNU General Public License |
25 | along with this program; if not, write to the Free Software |
18 | along with this program; if not, write to the Free Software |
26 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
19 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
27 | |
20 | |
28 | The authors can be reached via e-mail at crossfire-devel@real-time.com |
21 | The authors can be reached via e-mail at <crossfire@schmorp.de> |
29 | */ |
22 | */ |
30 | |
23 | |
31 | /* This file contains all the spell attack code. Grouping this code |
24 | /* This file contains all the spell attack code. Grouping this code |
32 | * together should hopefully make it easier to find the relevent bits |
25 | * together should hopefully make it easier to find the relevent bits |
33 | * of code |
26 | * of code |
… | |
… | |
185 | { |
178 | { |
186 | remove_ob (op); |
179 | remove_ob (op); |
187 | free_object (op); |
180 | free_object (op); |
188 | return; |
181 | return; |
189 | } |
182 | } |
|
|
183 | |
190 | hit_map (op, 0, op->attacktype, 1); |
184 | hit_map (op, 0, op->attacktype, 1); |
191 | |
185 | |
192 | if (!op->direction) |
186 | if (!op->direction) |
193 | return; |
187 | return; |
194 | |
188 | |
… | |
… | |
1044 | |
1038 | |
1045 | /* This copies a lot of the code from the fire bullet, |
1039 | /* This copies a lot of the code from the fire bullet, |
1046 | * but using the cast_bullet isn't really feasible, |
1040 | * but using the cast_bullet isn't really feasible, |
1047 | * so just set up the appropriate values. |
1041 | * so just set up the appropriate values. |
1048 | */ |
1042 | */ |
1049 | at = find_archetype (SPLINT); |
1043 | at = archetype::find (SPLINT); |
1050 | if (at) |
1044 | if (at) |
1051 | { |
1045 | { |
1052 | for (i = 1; i < 9; i++) |
1046 | for (i = 1; i < 9; i++) |
1053 | { |
1047 | { |
1054 | if (out_of_map (op->map, op->x + freearr_x[i], op->y + freearr_x[i])) |
1048 | if (out_of_map (op->map, op->x + freearr_x[i], op->y + freearr_x[i])) |