More tutorial level

Add more stuff to the tutorial level:
 - closing a door
 - cursed armor
 - taking off armor
 - shuffled descriptions
 - removing curses
 - reading scrolls
This commit is contained in:
Pasi Kallinen
2023-03-05 16:38:19 +02:00
parent db0441bf02
commit c2d6bde9cd
2 changed files with 57 additions and 6 deletions

View File

@@ -223,6 +223,38 @@ function tutorial_leave()
nh.gamestate(true);
end
local tutorial_events = {
{
ucoord = { 2, 5 },
remove = true,
func = function()
tutorial_whitelist_commands["close"] = true;
end,
},
{
ucoord = { 27, 10 },
remove = true,
func = function()
tutorial_whitelist_commands["takeoff"] = true;
end,
},
{
ucoord = { 22, 11 },
remove = true,
func = function()
tutorial_whitelist_commands["read"] = true;
end,
},
};
function tutorial_turn()
for k, v in pairs(tutorial_events) do
if ((v.ucoord and u.ux == v.ucoord[1] + 3 and u.uy == v.ucoord[2] + 3)
or (v.ucoord == nil)) then
if (v.func() or v.remove) then
tutorial_events[k] = nil;
end
end
end
-- nh.pline("TUT:turn");
end