version 1.93 | | version 1.94 |
---|
| | |
/* | | /* |
* static char *rcsid_attack_c = | | * static char *rcsid_attack_c = |
* "$Id: attack.c,v 1.93 2003/10/14 06:54:48 mwedel Exp $"; | | * "$Id: attack.c,v 1.94 2003/10/27 07:24:14 mwedel Exp $"; |
*/ | | */ |
/* | | /* |
CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
LOG(llevError,"kill_object - unable to find skill that killed monster\n"); | | LOG(llevError,"kill_object - unable to find skill that killed monster\n"); |
| | |
/* We have the skill we want to credit to - now find the object this goes | | /* We have the skill we want to credit to - now find the object this goes |
* to. | | * to. Make sure skop is an actual skill, and not a skill tool! |
*/ | | */ |
if (!skop && skill) { | | if ((!skop || skop->type != SKILL) && skill) { |
int i; | | int i; |
| | |
for (i=0; i<NUM_SKILLS; i++) | | for (i=0; i<NUM_SKILLS; i++) |
| | |
else { | | else { |
tmp = insert_ob_in_ob(tmp,op); | | tmp = insert_ob_in_ob(tmp,op); |
/* peterm: give poisoning some teeth. It should | | /* peterm: give poisoning some teeth. It should |
be able to kill things better than it does: | | * be able to kill things better than it does: |
damage should be dependent something--I choose to | | * damage should be dependent something--I choose to |
do this: if it's a monster, the damage from the | | * do this: if it's a monster, the damage from the |
poisoning goes as the level of the monster/2. | | * poisoning goes as the level of the monster/2. |
If anything else, goes as damage. */ | | * If anything else, goes as damage. |
| | */ |
| | |
if(QUERY_FLAG(hitter,FLAG_ALIVE)) | | if(QUERY_FLAG(hitter,FLAG_ALIVE)) |
tmp->stats.dam += hitter->level/2; | | tmp->stats.dam += hitter->level/2; |
| | |
tmp->stats.dam = dam; | | tmp->stats.dam = dam; |
| | |
copy_owner(tmp,hitter); /* so we get credit for poisoning kills */ | | copy_owner(tmp,hitter); /* so we get credit for poisoning kills */ |
| | if(hitter->skill && hitter->skill != tmp->skill) { |
| | if (tmp->skill) free_string(tmp->skill); |
| | tmp->skill = add_refcount(hitter->skill); |
| | } |
| | |
tmp->stats.food+=dam; /* more damage, longer poisoning */ | | tmp->stats.food+=dam; /* more damage, longer poisoning */ |
| | |
if(op->type==PLAYER) { | | if(op->type==PLAYER) { |