]> granicus.if.org Git - nethack/commitdiff
stuck_in_wall tweak
authorPatR <rankin@nethack.org>
Mon, 5 Mar 2018 20:26:44 +0000 (12:26 -0800)
committerPatR <rankin@nethack.org>
Mon, 5 Mar 2018 20:26:44 +0000 (12:26 -0800)
When divine aid granted temporary Passes_walls ability to stuck hero,
it was giving 4d4 turns (4..16, avg 10).  But the first warning that
it's timing out is given at 4 turns left so wouldn't be seen if the
random amount of time picked was the minimum.  Switch to 4d4+4 (8..20,
avg 14) so that the message at 4 turns left will always happen.

src/pray.c

index 29a2bd60150fd94c20c441776b9bf14512f97ec7..646de494cd7fb1cc17357e731667f3f6b00e78c8 100644 (file)
@@ -421,7 +421,7 @@ int trouble;
                Without something like this, fix_all_troubles can get
                stuck in an infinite loop trying to fix STUCK_IN_WALL
                and repeatedly failing. */
-            set_itimeout(&HPasses_walls, (long) d(4, 4));
+            set_itimeout(&HPasses_walls, (long) (d(4, 4) + 4)); /* 8..20 */
             /* how else could you move between packed rocks or among
                lattice forming "solid" rock? */
             You_feel("much slimmer.");