version 1.74 | | version 1.75 |
---|
| | |
/* | | /* |
* static char *rcsid_attack_c = | | * static char *rcsid_attack_c = |
* "$Id: attack.c,v 1.74 2002/09/07 05:55:18 mwedel Exp $"; | | * "$Id: attack.c,v 1.75 2002/09/28 07:19:40 mwedel Exp $"; |
*/ | | */ |
/* | | /* |
CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
* you summon vampires, you get some exp. Most of this code | | * you summon vampires, you get some exp. Most of this code |
* below is taken directly from kill_object | | * below is taken directly from kill_object |
*/ | | */ |
if (owner) { | | if (owner && owner != hitter) { |
if (owner != hitter) { | | |
old_skill = owner->chosen_skill; | | old_skill = owner->chosen_skill; |
owner->chosen_skill = hitter->chosen_skill; | | owner->chosen_skill = hitter->chosen_skill; |
owner->exp_obj=hitter->exp_obj; | | owner->exp_obj=hitter->exp_obj; |
| | |
owner->exp_obj->name, owner->name); | | owner->exp_obj->name, owner->name); |
owner->exp_obj = NULL; | | owner->exp_obj = NULL; |
} | | } |
} | | if (op->type != PLAYER || owner->type != PLAYER) |
add_exp(owner,op->stats.exp/(rate*2)); | | add_exp(owner,op->stats.exp/(rate*2)); |
owner->chosen_skill = old_skill; | | owner->chosen_skill = old_skill; |
} else { | | } else { |
| | if (op->type != PLAYER || hitter->type != PLAYER) |
add_exp(hitter,op->stats.exp/(rate*2)); | | add_exp(hitter,op->stats.exp/(rate*2)); |
} | | } |
| | if (hitter->type != PLAYER) |
add_exp(op,-op->stats.exp/rate); | | add_exp(op,-op->stats.exp/rate); |
} | | } |
dam = 1; /* Drain is an effect. Still return 1 - otherwise, if you have pure | | dam = 1; /* Drain is an effect. Still return 1 - otherwise, if you have pure |