version 1.24 | | version 1.25 |
---|
| | |
/* | | /* |
* static char *rcsid_skill_util_c = | | * static char *rcsid_skill_util_c = |
* "$Id: skill_util.c,v 1.24 2002/03/01 21:33:11 avogl Exp $"; | | * "$Id: skill_util.c,v 1.25 2002/03/02 01:48:51 avogl Exp $"; |
*/ | | */ |
/* | | /* |
CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
&& ((!pskill||!pskill->exp_obj)||!pskill->exp_obj->stats.Str)) { | | && ((!pskill||!pskill->exp_obj)||!pskill->exp_obj->stats.Str)) { |
int i=0,got_one=0; | | int i=0,got_one=0; |
object *tmp2=NULL; | | object *tmp2=NULL; |
while(attack_hth_skill[i]!=NULL) { | | |
| | /* dragons always use "clawing" hth skill per default */ |
| | if (!strcmp(op->race ,"dragon")) { |
for(tmp2=op->inv;tmp2;tmp2=tmp2->below) | | for(tmp2=op->inv;tmp2;tmp2=tmp2->below) |
if(tmp2->type==SKILL | | if(tmp2->type==SKILL |
| | && !strcmp("skill_clawing", tmp2->arch->name)) { |
| | got_one=1; |
| | break; |
| | } |
| | } |
| | |
| | /* for other players use first hth skill we find */ |
| | while(attack_hth_skill[i]!=NULL && !got_one) { |
| | for(tmp2=op->inv;tmp2;tmp2=tmp2->below) { |
| | if(tmp2->type==SKILL |
&& !strcmp(attack_hth_skill[i],tmp2->arch->name)) { | | && !strcmp(attack_hth_skill[i],tmp2->arch->name)) { |
got_one=1; | | got_one=1; |
break; | | break; |
} | | } |
| | } |
if(got_one) break; | | if(got_one) break; |
i++; | | i++; |
} | | } |