From 441d4983000eebefda783cdab5a863ddf5ae7db4 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Thu, 16 Mar 2023 07:43:47 +0200 Subject: [PATCH] Tutorial: being burdened, dropping items --- dat/nhlib.lua | 7 +++++++ dat/tut-1.lua | 39 ++++++++++++++++++++++++++------------- 2 files changed, 33 insertions(+), 13 deletions(-) diff --git a/dat/nhlib.lua b/dat/nhlib.lua index a18de8214..9127537e2 100644 --- a/dat/nhlib.lua +++ b/dat/nhlib.lua @@ -245,6 +245,13 @@ local tutorial_events = { tutorial_whitelist_commands["read"] = true; end, }, + { + ucoord = { 19, 7 }, + remove = true, + func = function() + tutorial_whitelist_commands["drop"] = true; + end, + }, }; function tutorial_turn() diff --git a/dat/tut-1.lua b/dat/tut-1.lua index b2d1b27d8..a118c06a6 100644 --- a/dat/tut-1.lua +++ b/dat/tut-1.lua @@ -5,21 +5,21 @@ des.level_flags("mazelevel", "noflip", des.map([[ --------------------------------------------------------------------------- -|-.--|.......|....|.......................................................| -|.-..........|....+.......................................................| -||.--|.......|....|.......................................................| -||.|.|.......|....|.......................................................| -||.|.|.......|....|.......................................................| -|-+-S-------------|.......................................................| -|......| |----------.............................................| +|-.--|.......|......|..|..................................................| +|.-..........|......|..|..................................................| +||.--|.......|..T......|..................................................| +||.|.|.......|......|-.|..................................................| +||.|.|.......|......|..|-.................................................| +|-+-S---------..---.|..+..................................................| +|......| |.---------.............................................| |......| ###### |.........|.............................................| |----.-| -+- # |.....---.|.............................................| |----+----.----+---.|.--|.|.|.............................................| |........|.|......|.|...F...|.............................................| |.P......-S|......|------.---.............................................| -|..........|......+.|...|.---.............................................| -|.W......---......|.|.|.|.+...............................................| -|....Z.L.|.F......|.|.|.|.---.............................................| +|..........|......+.|...|.|...............................................| +|.W......---......|.|.|.|.|...............................................| +|....Z.L.S.F......|.|.|.|.---.............................................| |........|--......|...|.....|.............................................| --------------------------------------------------------------------------- ]]); @@ -143,13 +143,26 @@ des.trap({ type = "magic portal", coord = { 19,11 }, seen = true }); -- -des.door({ coord = { 26,14 }, state = "locked" }); +-- rock fall +des.object({ coord = {14, 5}, id = "rock", quantity = math.random(50,99) }); +des.object({ coord = {15, 5}, id = "rock", quantity = math.random(10,30) }); +des.object({ coord = {14, 4}, id = "rock", quantity = math.random(10,30) }); +des.object({ coord = {15, 6}, id = "rock", quantity = math.random(30,60) }); +des.object({ coord = {14, 6}, id = "rock", quantity = math.random(30,60) }); +des.object({ coord = {14, 6}, id = "boulder" }); -des.engraving({ coord = { 27,14 }, type = "burn", text = "UNDER CONSTRUCTION", degrade = false }); +des.door({ coord = { 20,3 }, state = percent(50) and "open" or "closed" }); + +des.engraving({ coord = { 21,3 }, type = "engrave", text = "Avoid being burdened, it slows you down", degrade = false }); +des.engraving({ coord = { 22,3 }, type = "engrave", text = "Drop items with '" .. nh.eckey("drop") .. "'", degrade = false }); +des.engraving({ coord = { 22,4 }, type = "engrave", text = "You can drop partial stacks by prefixing the item slot letter with a number", degrade = false }); -- -des.door({ coord = { 18,2 }, state = percent(50) and "locked" or "closed" }); +des.door({ coord = { 23,6 }, state = "locked" }); + +des.engraving({ coord = { 24,6 }, type = "burn", text = "UNDER CONSTRUCTION", degrade = false }); + ----------------