]> granicus.if.org Git - nethack/commitdiff
Fix: overwriting stairs in movement tests
authorMichael Meyer <me@entrez.cc>
Fri, 26 Aug 2022 17:15:00 +0000 (13:15 -0400)
committerPasi Kallinen <paxed@alt.org>
Wed, 31 Aug 2022 15:24:26 +0000 (18:24 +0300)
Like some of the other coordinates in testmove.lua (addressed in
70008fc), the attempt to overwrite the stairs was targeting a spot
one space to the left of the actual position of the stairs, causing it
to have no effect (discussion suggested this may have been a result of
99715e0).  Update it so the stairs are properly erased and won't
interfere with movement tests by stopping a running/rushing hero early.

test/testmove.lua

index 39aa5b7b2d061921f531a3d5e1fe66a71d3af104..da1e0ab83ea3c1362f3f43a531e0a0369d5191b7 100644 (file)
@@ -15,7 +15,7 @@ function initlev()
    des.teleport_region({ region = {POS.x,POS.y,POS.x,POS.y}, region_islev = true, dir="both" });
    des.finalize_level();
    for k, v in pairs(nh.stairways()) do
-      des.terrain(v.x - 1, v.y, ".");
+      des.terrain(v.x, v.y, ".");
    end
 end