]> granicus.if.org Git - nethack/commitdiff
fix #K608 - ball and chain distance warning
authorPatR <rankin@nethack.org>
Mon, 16 Mar 2020 22:40:52 +0000 (15:40 -0700)
committerPatR <rankin@nethack.org>
Mon, 16 Mar 2020 22:40:52 +0000 (15:40 -0700)
This fixes the reported situation of recoiling from a throw while
levitating and carrying the ball not bringing the chain but it might
introduce other problems.  If it does, drag_ball() would be the place
to fix that, not hurtle_step().

Separate bug (not fixed):  throwing while the ball is on the floor
ought to let you recoil to as far as the chain will reach but it just
yields "you feel a tug from the ball" and you don't recoil at all.

doc/fixes37.0
src/dothrow.c

index 56685a76ea07159fb9592a40b5cbdece50827d77..46d09741eeb5cd217bbc87d8a1b8d4bee6a1a73e 100644 (file)
@@ -1,4 +1,4 @@
-$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.128 $ $NHDT-Date: 1583926845 2020/03/11 11:40:45 $
+$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.135 $ $NHDT-Date: 1584398443 2020/03/16 22:40:43 $
 
 General Fixes and Modified Features
 -----------------------------------
@@ -80,6 +80,8 @@ fix vault guard occasionally encasing monsters in stone
 tone down scare monster by excluding humans and uniques
 lock the castle chest
 revamp amnesia to forget skills instead of objects or maps
+when Punished and carrying the iron ball and levitating, hurtling in the
+       opposite direction of a thrown object didn't bring along the chain
 
 
 Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
index 3af418ecd069067973a9777017d9368aa6ba8b5c..50e2f07bd3584c608c6bae576b55178bf61ebd60 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.6 dothrow.c       $NHDT-Date: 1583073990 2020/03/01 14:46:30 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.183 $ */
+/* NetHack 3.6 dothrow.c       $NHDT-Date: 1584398443 2020/03/16 22:40:43 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.184 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /*-Copyright (c) Robert Patrick Rankin, 2013. */
 /* NetHack may be freely redistributed.  See license for details. */
@@ -714,8 +714,9 @@ int x, y;
         }
     }
 
-    /* Caller has already determined that dragging the ball is allowed */
-    if (Punished && uball->where == OBJ_FLOOR) {
+    /* caller has already determined that dragging the ball is allowed;
+       if ball is carried we might still need to drag the chain */
+    if (Punished) {
         int bc_control;
         xchar ballx, bally, chainx, chainy;
         boolean cause_delay;