]> granicus.if.org Git - nethack/commitdiff
github issue #935 - disarming swallowed hero
authorPatR <rankin@nethack.org>
Mon, 28 Nov 2022 10:08:49 +0000 (02:08 -0800)
committerPatR <rankin@nethack.org>
Mon, 28 Nov 2022 10:08:49 +0000 (02:08 -0800)
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

doc/fixes3-7-0.txt
src/muse.c

index 8c8dc26b9eef7228ed3535fbc95a9a851b613486..4ee9ace1f817a9e2b11c69bd0d88abd3a2ea8e8f 100644 (file)
@@ -1057,6 +1057,7 @@ some instances of using up or stealing shop-owned boulder didn't charge for it
 when hero hears an unseen monster reading a scroll, only describe the monster
        acccurately if hero is not hallucinating and monster is same species
        as hero's current form
+don't allow monsters to disarm hero with bullwhip if hero is engulfed
 
 
 Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
index a68ff93d0ba6d38c558024a4a7d50964d338bdfc..47ef16b7a7ef995abb7be4f873e1b5b09367336f 100644 (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;