|
From: <cro...@li...> - 2002-12-12 23:48:14
|
Module Name: crossfire
Committed By: garbled
Date: Thu Dec 12 23:48:11 UTC 2002
Modified Files:
crossfire/server: apply.c
Log Message:
Allow enchant weapon scrolls to be read against bows. Since bows and
swords can no longer be wielded together.. this isn't a problem anymore.
Start of context diffs
Index: crossfire/server/apply.c
diff -c crossfire/server/apply.c:1.71 crossfire/server/apply.c:1.72
*** crossfire/server/apply.c:1.71 Sat Nov 30 19:46:25 2002
--- crossfire/server/apply.c Thu Dec 12 15:48:10 2002
***************
*** 1,6 ****
/*
* static char *rcsid_apply_c =
! * "$Id: apply.c,v 1.71 2002/12/01 03:46:25 mwedel Exp $";
*/
/*
CrossFire, A Multiplayer game for X-windows
--- 1,6 ----
/*
* static char *rcsid_apply_c =
! * "$Id: apply.c,v 1.72 2002/12/12 23:48:10 garbled Exp $";
*/
/*
CrossFire, A Multiplayer game for X-windows
***************
*** 412,418 ****
*/
if (i<NROFATTACKS ||
weapon->stats.hp || /* regeneration */
! weapon->stats.sp || /* sp regeneration */
weapon->stats.exp || /* speed */
weapon->stats.ac) /* AC - only taifu's I think */
{
--- 412,418 ----
*/
if (i<NROFATTACKS ||
weapon->stats.hp || /* regeneration */
! (weapon->stats.sp && weapon->type == WEAPON) || /* sp regeneration */
weapon->stats.exp || /* speed */
weapon->stats.ac) /* AC - only taifu's I think */
{
***************
*** 574,581 ****
new_draw_info(NDI_UNIQUE, 0, op, "You need to mark a weapon object.");
return 0;
}
! if (otmp->type!=WEAPON) {
! new_draw_info(NDI_UNIQUE, 0,op,"Marked item is not a weapon");
return 0;
}
new_draw_info(NDI_UNIQUE, 0,op,"Applied weapon builder.");
--- 574,581 ----
new_draw_info(NDI_UNIQUE, 0, op, "You need to mark a weapon object.");
return 0;
}
! if (otmp->type != WEAPON && otmp->type != BOW) {
! new_draw_info(NDI_UNIQUE, 0,op,"Marked item is not a weapon or bow");
return 0;
}
new_draw_info(NDI_UNIQUE, 0,op,"Applied weapon builder.");
***************
*** 2946,2955 ****
SET_FLAG (who, FLAG_READY_SKILL);
break;
case WAND:
case ROD:
case HORN:
- case BOW:
/* check for skill, alter player status */
SET_FLAG(op, FLAG_APPLIED);
if(!check_skill_to_apply(who,op)) return 1;
--- 2946,2971 ----
SET_FLAG (who, FLAG_READY_SKILL);
break;
+ case BOW:
+ if (!check_weapon_power(who, op->last_eat)) {
+ new_draw_info(NDI_UNIQUE, 0, who,
+ "That item is too powerful for you to use.");
+ new_draw_info(NDI_UNIQUE, 0, who, "It would consume your soul!.");
+ if(tmp != NULL)
+ (void)insert_ob_in_ob(tmp,who);
+ return 1;
+ }
+ if( op->level && (strncmp(op->name,who->name,strlen(who->name)))) {
+ new_draw_info(NDI_UNIQUE, 0, who,
+ "The weapon does not recognize you as its owner.");
+ if(tmp != NULL)
+ (void)insert_ob_in_ob(tmp,who);
+ return 1;
+ }
+ /*FALLTHROUGH*/
case WAND:
case ROD:
case HORN:
/* check for skill, alter player status */
SET_FLAG(op, FLAG_APPLIED);
if(!check_skill_to_apply(who,op)) return 1;
***************
*** 2957,2962 ****
--- 2973,2979 ----
if(who->type==PLAYER) {
if (op->type == BOW) {
+ (void)change_abil(who, op);
new_draw_info_format (NDI_UNIQUE, 0, who,
"You will now fire %s with %s.",
op->race ? op->race : "nothing", query_name(op));
|