version 1.64 | | version 1.65 |
---|
| | |
/* | | /* |
* static char *rcsid_attack_c = | | * static char *rcsid_attack_c = |
* "$Id: attack.c,v 1.64 2001/12/18 09:45:07 darth_bob Exp $"; | | * "$Id: attack.c,v 1.65 2001/12/19 03:46:49 darth_bob Exp $"; |
*/ | | */ |
/* | | /* |
CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
if ((op->type == GOLEM) || (QUERY_FLAG(op, FLAG_UNDEAD))) return 0; | | if ((op->type == GOLEM) || (QUERY_FLAG(op, FLAG_UNDEAD))) return 0; |
/* If drain protection is higher than life stealing, use that */ | | /* If drain protection is higher than life stealing, use that */ |
if (op->resist[ATNR_DRAIN] >= op->resist[ATNR_LIFE_STEALING]) | | if (op->resist[ATNR_DRAIN] >= op->resist[ATNR_LIFE_STEALING]) |
dam = (dam*(100 - op->resist[ATNR_DRAIN])) / 1000; | | dam = (dam*(100 - op->resist[ATNR_DRAIN])) / 3000; |
else dam = (dam*(100 - op->resist[ATNR_LIFE_STEALING])) / 1000; | | else dam = (dam*(100 - op->resist[ATNR_LIFE_STEALING])) / 3000; |
/* You die at -1 hp, not zero. */ | | /* You die at -1 hp, not zero. */ |
if (dam > (op->stats.hp+1)) dam = op->stats.hp+1; | | if (dam > (op->stats.hp+1)) dam = op->stats.hp+1; |
new_hp = hitter->stats.hp + dam; | | new_hp = hitter->stats.hp + dam; |