ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/attack.c
(Generate patch)

Comparing deliantra/server/server/attack.c (file contents):
Revision 1.1.1.2 by elmex, Wed Feb 22 18:03:19 2006 UTC vs.
Revision 1.5 by root, Fri Mar 24 10:51:18 2006 UTC

1/* 1/*
2 * static char *rcsid_attack_c = 2 * static char *rcsid_attack_c =
3 * "$Id: attack.c,v 1.1.1.2 2006/02/22 18:03:19 elmex Exp $"; 3 * "$Id: attack.c,v 1.5 2006/03/24 10:51:18 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 && !op_on_battleground (op, 0, 0)) {
1663 return 0;
1664 }
1665 }
1666#endif
1667
1658 op_tag = op->count; 1668 op_tag = op->count;
1659 hitter_tag = hitter->count; 1669 hitter_tag = hitter->count;
1660 1670
1661 if (body_attack) { 1671 if (body_attack) {
1662 /* slow and paralyze must hit the head. But we don't want to just 1672 /* slow and paralyze must hit the head. But we don't want to just
1766 * doing damage - otherwise, the +1 in the coe below will make 1776 * doing damage - otherwise, the +1 in the coe below will make
1767 * an attack do damage before when it otherwise didn't 1777 * an attack do damage before when it otherwise didn't
1768 */ 1778 */
1769 friendlyfire = friendly_fire(op, hitter); 1779 friendlyfire = friendly_fire(op, hitter);
1770 if (friendlyfire && maxdam){ 1780 if (friendlyfire && maxdam){
1771 maxdam = ((dam * settings.set_friendly_fire) / 100)+1; 1781 maxdam = ((dam * settings.set_friendly_fire) / 100);
1772 1782#ifndef COZY_SERVER
1783 maxdam++;
1784#endif
1785
1773#ifdef ATTACK_DEBUG 1786#ifdef ATTACK_DEBUG
1774 LOG(llevDebug,"Friendly fire (type:%d setting: %d%) did %d damage dropped to %d\n", 1787 LOG(llevDebug,"Friendly fire (type:%d setting: %d%) did %d damage dropped to %d\n",
1775 friendlyfire, settings.set_friendly_fire, dam, maxdam); 1788 friendlyfire, settings.set_friendly_fire, dam, maxdam);
1776#endif 1789#endif
1777 } 1790 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines