1 | /* |
1 | /* |
2 | * static char *rcsid_attack_c = |
2 | * static char *rcsid_attack_c = |
3 | * "$Id: attack.C,v 1.3 2006/08/26 23:36:33 root Exp $"; |
3 | * "$Id: attack.C,v 1.4 2006/08/29 07:34:00 root Exp $"; |
4 | */ |
4 | */ |
5 | /* |
5 | /* |
6 | CrossFire, A Multiplayer game for X-windows |
6 | CrossFire, A Multiplayer game for X-windows |
7 | |
7 | |
8 | Copyright (C) 2002 Mark Wedel & Crossfire Development Team |
8 | Copyright (C) 2002 Mark Wedel & Crossfire Development Team |
… | |
… | |
336 | * For example, 'tmp' was put in an icecube. |
336 | * For example, 'tmp' was put in an icecube. |
337 | * This is one of the few cases where on_same_map should not be used. |
337 | * This is one of the few cases where on_same_map should not be used. |
338 | */ |
338 | */ |
339 | if (tmp->map != map || tmp->x != x || tmp->y != y) |
339 | if (tmp->map != map || tmp->x != x || tmp->y != y) |
340 | continue; |
340 | continue; |
341 | |
|
|
342 | /* Need to hit everyone in the transport with this spell */ |
|
|
343 | if (tmp->type == TRANSPORT) { |
|
|
344 | object *pl; |
|
|
345 | |
|
|
346 | for (pl=tmp->inv; pl; pl=pl->below) { |
|
|
347 | if (pl->type == PLAYER) |
|
|
348 | hit_player(pl,op->stats.dam,op,type,full_hit); |
|
|
349 | } |
|
|
350 | } |
|
|
351 | |
341 | |
352 | if (QUERY_FLAG (tmp, FLAG_ALIVE)) { |
342 | if (QUERY_FLAG (tmp, FLAG_ALIVE)) { |
353 | hit_player(tmp,op->stats.dam,op,type,full_hit); |
343 | hit_player(tmp,op->stats.dam,op,type,full_hit); |
354 | retflag |=1; |
344 | retflag |=1; |
355 | if (was_destroyed (op, op_tag)) |
345 | if (was_destroyed (op, op_tag)) |