Move movement tests

Rushing will go along a snaking corridor.
This commit is contained in:
Pasi Kallinen
2021-08-09 16:13:09 +03:00
parent f5b617eaca
commit 1c401960aa

View File

@@ -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 = "#" },
};