From 3f3c275ed55cda1024bb551ad296f2e8db0ac9ab Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Sat, 18 Mar 2023 11:04:27 +0200 Subject: [PATCH] Tutorial: throwing items --- dat/nhlib.lua | 8 ++++++++ dat/tut-1.lua | 24 ++++++++++++++---------- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/dat/nhlib.lua b/dat/nhlib.lua index 9127537e2..efcffe26e 100644 --- a/dat/nhlib.lua +++ b/dat/nhlib.lua @@ -252,6 +252,14 @@ local tutorial_events = { tutorial_whitelist_commands["drop"] = true; end, }, + { + ucoord = { 24, 6 }, + remove = true, + func = function() + tutorial_whitelist_commands["throw"] = true; + tutorial_whitelist_commands["fire"] = true; + end, + }, }; function tutorial_turn() diff --git a/dat/tut-1.lua b/dat/tut-1.lua index a118c06a6..17f25b3a4 100644 --- a/dat/tut-1.lua +++ b/dat/tut-1.lua @@ -5,12 +5,12 @@ des.level_flags("mazelevel", "noflip", des.map([[ --------------------------------------------------------------------------- -|-.--|.......|......|..|..................................................| -|.-..........|......|..|..................................................| -||.--|.......|..T......|..................................................| -||.|.|.......|......|-.|..................................................| -||.|.|.......|......|..|-.................................................| -|-+-S---------..---.|..+..................................................| +|-.--|.......|......|..S....|.............................................| +|.-..........|......|--|....|.............................................| +||.--|.......|..T......|....|.............................................| +||.|.|.......|......|-.|....|.............................................| +||.|.|.......|......||.|-.---.............................................| +|-+-S---------..---.||......+.............................................| |......| |.---------.............................................| |......| ###### |.........|.............................................| |----.-| -+- # |.....---.|.............................................| @@ -68,12 +68,12 @@ des.trap({ type = "magic portal", coord = { 4,4 }, seen = true }); -- -des.engraving({ coord = { 5,9 }, type = "engrave", text = "This door is locked. Kick it with " .. nh.eckey("kick"), degrade = false }); +des.engraving({ coord = { 5,9 }, type = "engrave", text = "This door is locked. Kick it with '" .. nh.eckey("kick") .. "'", degrade = false }); des.door({ coord = { 5,10 }, state = "locked" }); -- -des.engraving({ coord = { 10,13 }, type = "engrave", text = "Use " .. nh.eckey("search") .. " to search for secret doors", degrade = false }); +des.engraving({ coord = { 10,13 }, type = "engrave", text = "Use '" .. nh.eckey("search") .. "' to search for secret doors", degrade = false }); -- @@ -159,10 +159,14 @@ des.engraving({ coord = { 22,4 }, type = "engrave", text = "You can drop partial -- -des.door({ coord = { 23,6 }, state = "locked" }); +des.monster({ id = "yellow mold", coord = { 26,2 }, waiting = true, countbirth = false }); -des.engraving({ coord = { 24,6 }, type = "burn", text = "UNDER CONSTRUCTION", degrade = false }); +des.engraving({ coord = { 25,5 }, type = "engrave", text = "Throw items with '" .. nh.eckey("throw") .. "'", degrade = false }); +-- + +des.door({ coord = { 28,6 }, state = "locked" }); +des.engraving({ coord = { 29,6 }, type = "burn", text = "UNDER CONSTRUCTION", degrade = false }); ----------------