From 20dbd989f14b3f125ff6b511b1bd9ff1732d9593 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Sat, 18 Mar 2023 11:42:48 +0200 Subject: [PATCH] Tutorial: Firing missiles and quiver --- dat/nhlib.lua | 2 ++ dat/tut-1.lua | 35 ++++++++++++++++++++++++++--------- 2 files changed, 28 insertions(+), 9 deletions(-) diff --git a/dat/nhlib.lua b/dat/nhlib.lua index efcffe26e..5049d075b 100644 --- a/dat/nhlib.lua +++ b/dat/nhlib.lua @@ -192,6 +192,7 @@ local tutorial_whitelist_commands = { ["kick"] = true, ["search"] = true, ["pickup"] = true, + ["wait"] = true, ["wear"] = true, ["wield"] = true, -- ["save"] = true, @@ -258,6 +259,7 @@ local tutorial_events = { func = function() tutorial_whitelist_commands["throw"] = true; tutorial_whitelist_commands["fire"] = true; + tutorial_whitelist_commands["quiver"] = true; end, }, }; diff --git a/dat/tut-1.lua b/dat/tut-1.lua index 17f25b3a4..43e279a05 100644 --- a/dat/tut-1.lua +++ b/dat/tut-1.lua @@ -5,13 +5,13 @@ des.level_flags("mazelevel", "noflip", des.map([[ --------------------------------------------------------------------------- -|-.--|.......|......|..S....|.............................................| -|.-..........|......|--|....|.............................................| -||.--|.......|..T......|....|.............................................| -||.|.|.......|......|-.|....|.............................................| -||.|.|.......|......||.|-.---.............................................| -|-+-S---------..---.||......+.............................................| -|......| |.---------.............................................| +|-.--|.......|......|..S....|.F.......|...................................| +|.-..........|......|--|....|.F.....|.|...................................| +||.--|.......|..T......|....|.F.....|.|...................................| +||.|.|.......|......|-.|....|.F.....|.|...................................| +||.|.|.......|......||.|-.-----------.-...................................| +|-+-S---------..---.||....................................................| +|......| |.-------------------...................................| |......| ###### |.........|.............................................| |----.-| -+- # |.....---.|.............................................| |----+----.----+---.|.--|.|.|.............................................| @@ -165,8 +165,25 @@ des.engraving({ coord = { 25,5 }, type = "engrave", text = "Throw items with '" -- -des.door({ coord = { 28,6 }, state = "locked" }); -des.engraving({ coord = { 29,6 }, type = "burn", text = "UNDER CONSTRUCTION", degrade = false }); +des.monster({ id = "wolf", coord = { 29,2 }, peaceful = 0, waiting = true, countbirth = false }); + +des.engraving({ coord = { 37,4 }, type = "engrave", text = "Missiles, such as rocks, work better when fired from appropriate launcher", degrade = false }); + +des.object({ coord = { 37,3 }, id = "sling", buc = "not-cursed", spe = 9 }); +des.engraving({ coord = { 37,3 }, type = "engrave", text = "Wield the sling", degrade = false }); +des.engraving({ coord = { 36,1 }, type = "engrave", text = "Use '" .. nh.eckey("fire") .. "' to fire missiles with the wielded launcher", degrade = false }); + +des.engraving({ coord = { 35,4 }, type = "engrave", text = "Firing launches items from your quiver; Use '" .. nh.eckey("quiver") .. "' to put items in it", degrade = false }); + +des.engraving({ coord = { 33,4 }, type = "engrave", text = "You can wait a turn with '" .. nh.eckey("wait") .. "'", degrade = false }); + + +-- + +des.door({ coord = { 38,6 }, state = "locked" }); +des.engraving({ coord = { 39,6 }, type = "burn", text = "UNDER CONSTRUCTION", degrade = false }); + +des.trap({ type = "magic portal", coord = { 45,6 }, seen = true }); ----------------