version 1.92 | | version 1.93 |
---|
| | |
/* | | /* |
* static char *rcsid_apply_c = | | * static char *rcsid_apply_c = |
* "$Id: apply.c,v 1.92 2003/11/10 05:39:50 mwedel Exp $"; | | * "$Id: apply.c,v 1.93 2003/11/11 07:37:10 mwedel Exp $"; |
*/ | | */ |
/* | | /* |
CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
*/ | | */ |
int check_weapon_power(object *who, int improvs) | | int check_weapon_power(object *who, int improvs) |
{ | | { |
int level=who->level; | | int level=0; |
| | |
/* The skill system hands out wc and dam bonuses to fighters | | /* The skill system hands out wc and dam bonuses to fighters |
* more generously than the old system (see fix_player). Thus | | * more generously than the old system (see fix_player). Thus |
| | |
object *wc_obj=NULL; | | object *wc_obj=NULL; |
| | |
for(wc_obj=who->inv;wc_obj;wc_obj=wc_obj->below) | | for(wc_obj=who->inv;wc_obj;wc_obj=wc_obj->below) |
if(wc_obj->type==EXPERIENCE&&wc_obj->stats.Str) break; | | if (wc_obj->type == SKILL && IS_COMBAT_SKILL(wc_obj->subtype) && wc_obj->level > level) |
if(!wc_obj) | | |
LOG(llevError,"Error: Player: %s lacks wc experience object\n",who->name); | | |
else | | |
level=wc_obj->level; | | level=wc_obj->level; |
| | |
| | if (!level ) { |
| | LOG(llevError,"Error: Player: %s lacks wc experience object\n",who->name); |
| | level = who->level; |
} | | } |
| | } |
| | else |
| | level=who->level; |
| | |
return (improvs <= ((level/5)+5)); | | return (improvs <= ((level/5)+5)); |
} | | } |
| | |
| | |
for (tmp=who->inv; tmp; tmp=tmp->below) { | | for (tmp=who->inv; tmp; tmp=tmp->below) { |
if (QUERY_FLAG(tmp, FLAG_APPLIED) && tmp->type == op->type) { | | if (QUERY_FLAG(tmp, FLAG_APPLIED) && tmp->type == op->type) { |
if ((aflags & AP_IGNORE_CURSE) || (aflags & AP_PRINT) || | | if ((aflags & AP_IGNORE_CURSE) || (aflags & AP_PRINT) || |
(!(QUERY_FLAG(tmp, FLAG_CURSED) && !QUERY_FLAG(tmp, FLAG_DAMNED)))) { | | (!QUERY_FLAG(tmp, FLAG_CURSED) && !QUERY_FLAG(tmp, FLAG_DAMNED))) { |
if (aflags & AP_PRINT) | | if (aflags & AP_PRINT) |
new_draw_info(NDI_UNIQUE, 0, who, query_name(tmp)); | | new_draw_info(NDI_UNIQUE, 0, who, query_name(tmp)); |
else | | else |