github issue #935 - disarming swallowed hero

Issue reported by AndrioCelos:  bullwhip using monster was able to
snatch hero's weapon when hero was engulfed.

Fix is trivial:  when a monster is choosing an item to use, don't
pick bullwhip if hero is engulfed.  Regular attack attempts already
skip engulfed hero.

Fixes #935
This commit is contained in:
PatR
2022-11-28 02:08:49 -08:00
parent 223818ff41
commit 8836b32128
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -1963,6 +1963,7 @@ find_misc(struct monst* mtmp)
&& next2u(mtmp->mx, mtmp->my)
/* don't bother if it can't work (this doesn't
prevent cursed weapons from being targeted) */
&& !u.uswallow
&& (canletgo(uwep, "")
|| (u.twoweap && canletgo(uswapwep, "")))) {
g.m.misc = obj;