version 1.67 | | version 1.68 |
---|
| | |
/* | | /* |
* static char *rcsid_skill_util_c = | | * static char *rcsid_skill_util_c = |
* "$Id: skill_util.c,v 1.67 2006/06/05 06:28:56 mwedel Exp $"; | | * "$Id: skill_util.c,v 1.68 2006/07/25 11:44:44 gros Exp $"; |
*/ | | */ |
/* | | /* |
CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
object *tmp, *best_skill=NULL; | | object *tmp, *best_skill=NULL; |
int dragon = is_dragon_pl(op), last_skill=sizeof(unarmed_skills), i; | | int dragon = is_dragon_pl(op), last_skill=sizeof(unarmed_skills), i; |
| | |
| | /* Dragons are a special case - gros 25th July 2006 */ |
| | if (dragon) |
| | { |
| | tmp = find_skill_by_number(op, SK_CLAWING); |
| | if (tmp) /* I suppose it should always be true - but maybe there's |
| | * draconic toothache ? :) */ |
| | return tmp; |
| | } |
for (tmp=op->inv; tmp; tmp=tmp->below) { | | for (tmp=op->inv; tmp; tmp=tmp->below) { |
if (tmp->type == SKILL) { | | if (tmp->type == SKILL) { |
if (dragon && tmp->subtype == SK_CLAWING) return tmp; | | |
| | |
/* The order in the array is preferred order. So basically, | | /* The order in the array is preferred order. So basically, |
* we just cut down the number to search - eg, if we find a skill | | * we just cut down the number to search - eg, if we find a skill |