From: Pasi Kallinen Date: Mon, 9 Aug 2021 13:13:09 +0000 (+0300) Subject: Move movement tests X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1c401960aa46d7288f06dd32613cfce101380560;p=nethack Move movement tests Rushing will go along a snaking corridor. --- diff --git a/test/testmove.lua b/test/testmove.lua index c5c3eee52..12d4a61ee 100644 --- a/test/testmove.lua +++ b/test/testmove.lua @@ -48,6 +48,18 @@ function setup3(param) des.replace_terrain({ region={01,01, 74,18}, fromterrain="C", toterrain=param, chance=100 }); end +function setup4(param) + local mapstr = [[ +------------ +|CCCC|CCC| | +|---C|C|C|-- +| |CCC|CCC| +------------ +]]; + des.map({ x = POS.x - 1, y = POS.y - 1, map = mapstr }); + des.replace_terrain({ region={01,01, 74,18}, fromterrain="C", toterrain=param, chance=100 }); +end + local basicmoves = { -- move h = { dx = -1, dy = 0, number_pad = 0 }, @@ -122,6 +134,9 @@ local basicmoves = { { key = ctrl("k"), x = POS.x, y = POS.y - 3, number_pad = 0, setup = setup3, param = "." }, { key = ctrl("k"), x = POS.x + 4, y = POS.y - 3, number_pad = 0, setup = setup3, param = "#" }, + { key = ctrl("l"), x = POS.x + 3, y = POS.y, number_pad = 0, setup = setup4, param = "." }, + { key = ctrl("l"), x = POS.x + 9, y = POS.y + 2, number_pad = 0, setup = setup4, param = "#" }, + };