diff --git a/include/extern.h b/include/extern.h index de0294635..ed4b88bfd 100644 --- a/include/extern.h +++ b/include/extern.h @@ -52,6 +52,7 @@ extern boolean catch_lit(struct obj *); extern void use_unicorn_horn(struct obj **); extern boolean tinnable(struct obj *); extern void reset_trapset(void); +extern int use_whip(struct obj *); extern int use_pole(struct obj *, boolean); extern void fig_transform(union any *, long); extern int unfixable_trouble_count(boolean); diff --git a/src/apply.c b/src/apply.c index 7ce9c6673..ec9cae2d1 100644 --- a/src/apply.c +++ b/src/apply.c @@ -28,7 +28,6 @@ static void use_trap(struct obj *); static int touchstone_ok(struct obj *); static void use_stone(struct obj *); static int set_trap(void); /* occupation callback */ -static int use_whip(struct obj *); static void display_polearm_positions(int); static int use_cream_pie(struct obj *); static int jelly_ok(struct obj *); @@ -2689,7 +2688,7 @@ set_trap(void) return 0; } -static int +int use_whip(struct obj *obj) { char buf[BUFSZ]; diff --git a/src/dothrow.c b/src/dothrow.c index 9c3bf1498..01bde0e27 100644 --- a/src/dothrow.c +++ b/src/dothrow.c @@ -451,6 +451,9 @@ dofire(void) /* if we're wielding a polearm, apply it */ if (uwep && is_pole(uwep)) return use_pole(uwep, TRUE); + /* if we're wielding a bullwhip, apply it */ + else if (uwep && uwep->otyp == BULLWHIP) + return use_whip(uwep); else if (iflags.fireassist && uswapwep && is_pole(uswapwep) && !(uswapwep->cursed && uswapwep->bknown)) {