Apply a wielded bullwhip with fire-command

This commit is contained in:
Pasi Kallinen
2022-01-06 17:12:30 +02:00
parent 5b02ad521d
commit a77e1602f1
3 changed files with 5 additions and 2 deletions

View File

@@ -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);

View File

@@ -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];

View File

@@ -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)) {