1 | /* |
1 | /* |
2 | * static char *rcsid_c_object_c = |
2 | * static char *rcsid_c_object_c = |
3 | * "$Id: c_object.c,v 1.1.1.3 2006/03/15 14:05:35 elmex Exp $"; |
3 | * "$Id: c_object.c,v 1.3 2006/05/17 19:24:45 root Exp $"; |
4 | */ |
4 | */ |
5 | /* |
5 | /* |
6 | CrossFire, A Multiplayer game for X-windows |
6 | CrossFire, A Multiplayer game for X-windows |
7 | |
7 | |
8 | Copyright (C) 2002 Mark Wedel & Crossfire Development Team |
8 | Copyright (C) 2002 Mark Wedel & Crossfire Development Team |
… | |
… | |
424 | } |
424 | } |
425 | return change_skill(pl,skill, 0); |
425 | return change_skill(pl,skill, 0); |
426 | } |
426 | } |
427 | |
427 | |
428 | |
428 | |
429 | /* These functions (command_search, command_disarm) are really juse wrappers for |
429 | /* These functions (command_search, command_disarm) are really just wrappers for |
430 | * things like 'use_skill ...'). In fact, they should really be obsoleted |
430 | * things like 'use_skill ...'). In fact, they should really be obsoleted |
431 | * and replaced with those. |
431 | * and replaced with those. |
432 | */ |
432 | */ |
433 | int command_search (object *op, char *params) { |
433 | int command_search (object *op, char *params) { |
434 | return use_skill(op, skill_names[SK_FIND_TRAPS]); |
434 | return use_skill(op, skill_names[SK_FIND_TRAPS]); |
… | |
… | |
513 | "You can put only %s into the %s.", sack->race, query_name(sack)); |
513 | "You can put only %s into the %s.", sack->race, query_name(sack)); |
514 | return 0; |
514 | return 0; |
515 | } |
515 | } |
516 | if (op->type == SPECIAL_KEY && sack->slaying && op->slaying) { |
516 | if (op->type == SPECIAL_KEY && sack->slaying && op->slaying) { |
517 | new_draw_info_format(NDI_UNIQUE, 0, pl, |
517 | new_draw_info_format(NDI_UNIQUE, 0, pl, |
518 | "You can't want put the key into %s.", query_name(sack)); |
518 | "You can't put the key into %s.", query_name(sack)); |
519 | return 0; |
519 | return 0; |
520 | } |
520 | } |
521 | if (sack->weight_limit && sack->carrying + (nrof ? nrof : 1) * |
521 | if (sack->weight_limit && sack->carrying + (nrof ? nrof : 1) * |
522 | (op->weight + (op->type==CONTAINER?(op->carrying*op->stats.Str):0)) |
522 | (op->weight + (op->type==CONTAINER?(op->carrying*op->stats.Str):0)) |
523 | * (100 - sack->stats.Str) / 100 > sack->weight_limit) { |
523 | * (100 - sack->stats.Str) / 100 > sack->weight_limit) { |