version 1.163 | | version 1.164 |
---|
| | |
/* | | /* |
* static char *rcsid_apply_c = | | * static char *rcsid_apply_c = |
* "$Id: apply.c,v 1.163 2006/02/15 07:51:09 mwedel Exp $"; | | * "$Id: apply.c,v 1.164 2006/02/17 21:29:48 akirschbaum Exp $"; |
*/ | | */ |
/* | | /* |
CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
* but in the future, possible transport may have more restrictions | | * but in the future, possible transport may have more restrictions |
* or weight reduction like containers | | * or weight reduction like containers |
*/ | | */ |
int transport_can_hold(object *transport, object *op, int nrof) | | int transport_can_hold(const object *transport, const object *op, int nrof) |
{ | | { |
if ((op->weight *nrof + transport->carrying) > transport->weight_limit) | | if ((op->weight *nrof + transport->carrying) > transport->weight_limit) |
return 0; | | return 0; |
| | |
/** | | /** |
* This returns the sum of nrof of item (arch name). | | * This returns the sum of nrof of item (arch name). |
*/ | | */ |
int check_item(object *op,const char *item) | | static int check_item(object *op, const char *item) |
{ | | { |
int count=0; | | int count=0; |
| | |
| | |
* increased value to see if the object is usuable. | | * increased value to see if the object is usuable. |
* we return 1 (true) if the player can use the weapon. | | * we return 1 (true) if the player can use the weapon. |
*/ | | */ |
int check_weapon_power(object *who, int improvs) | | static int check_weapon_power(const object *who, int improvs) |
{ | | { |
/* Old code is below (commented out). Basically, since weapons are the only | | /* Old code is below (commented out). Basically, since weapons are the only |
* object players really have any control to improve, it's a bit harsh to | | * object players really have any control to improve, it's a bit harsh to |
| | |
* Returns how many items of type improver->slaying there are under op. | | * Returns how many items of type improver->slaying there are under op. |
* Will display a message if none found, and 1 if improver->slaying is NULL. | | * Will display a message if none found, and 1 if improver->slaying is NULL. |
*/ | | */ |
static int check_sacrifice(object *op,object *improver) | | static int check_sacrifice(object *op, const object *improver) |
{ | | { |
int count=0; | | int count=0; |
| | |
| | |
case IMPROVE_POW: | | case IMPROVE_POW: |
return improve_weapon_stat(op,improver,weapon, | | return improve_weapon_stat(op,improver,weapon, |
(signed char *) &(weapon->stats.Pow), | | (signed char *) &(weapon->stats.Pow), |
1,(char *) "power"); | | 1, "power"); |
default: | | default: |
new_draw_info(NDI_UNIQUE, 0,op,"Unknown improvement type."); | | new_draw_info(NDI_UNIQUE, 0,op,"Unknown improvement type."); |
} | | } |