1 | /* |
1 | /* |
2 | * static char *rcsid_attack_c = |
2 | * static char *rcsid_attack_c = |
3 | * "$Id: attack.c,v 1.4 2006/02/22 18:53:56 elmex Exp $"; |
3 | * "$Id: attack.c,v 1.6 2006/03/26 08:32:11 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 |
… | |
… | |
1653 | |
1653 | |
1654 | /* very simple: if our target has no_damage 1 set or is wiz, we can't hurt him */ |
1654 | /* very simple: if our target has no_damage 1 set or is wiz, we can't hurt him */ |
1655 | if (QUERY_FLAG (op, FLAG_WIZ) || QUERY_FLAG (op, FLAG_NO_DAMAGE)) |
1655 | if (QUERY_FLAG (op, FLAG_WIZ) || QUERY_FLAG (op, FLAG_NO_DAMAGE)) |
1656 | return 0; |
1656 | return 0; |
1657 | |
1657 | |
|
|
1658 | #ifdef PROHIBIT_PLAYERKILL |
|
|
1659 | if (op->type == PLAYER) { |
|
|
1660 | object *owner = get_owner (hitter); |
|
|
1661 | if (!owner) owner = hitter; |
|
|
1662 | if (owner->type == PLAYER |
|
|
1663 | && !op_on_battleground (op, 0, 0) |
|
|
1664 | && op != owner) { |
|
|
1665 | return 0; |
|
|
1666 | } |
|
|
1667 | } |
|
|
1668 | #endif |
|
|
1669 | |
1658 | op_tag = op->count; |
1670 | op_tag = op->count; |
1659 | hitter_tag = hitter->count; |
1671 | hitter_tag = hitter->count; |
1660 | |
1672 | |
1661 | if (body_attack) { |
1673 | if (body_attack) { |
1662 | /* slow and paralyze must hit the head. But we don't want to just |
1674 | /* slow and paralyze must hit the head. But we don't want to just |