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:
@@ -223,6 +223,38 @@ function tutorial_leave()
|
|||||||
nh.gamestate(true);
|
nh.gamestate(true);
|
||||||
end
|
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()
|
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");
|
-- nh.pline("TUT:turn");
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -11,11 +11,11 @@ des.map([[
|
|||||||
||.|.|.......|....|.......................................................|
|
||.|.|.......|....|.......................................................|
|
||||||
||.|.|.......|....|.......................................................|
|
||.|.|.......|....|.......................................................|
|
||||||
|-+-S-------------|.......................................................|
|
|-+-S-------------|.......................................................|
|
||||||
|......| |.......................................................|
|
|......| |----------.............................................|
|
||||||
|......| ###### |.......................................................|
|
|......| ###### |.........|.............................................|
|
||||||
|----.-| -+- # |.....-----.............................................|
|
|----.-| -+- # |.....---.|.............................................|
|
||||||
|----+----.----+---.....|...|.............................................|
|
|----+----.----+---.|.--|.|.|.............................................|
|
||||||
|........|.|......|.....F...|.............................................|
|
|........|.|......|.|...F...|.............................................|
|
||||||
|.P......-S|......|------.---.............................................|
|
|.P......-S|......|------.---.............................................|
|
||||||
|..........|......+.|...|.---.............................................|
|
|..........|......+.|...|.---.............................................|
|
||||||
|.W......---......|.|.|.|.+...............................................|
|
|.W......---......|.|.|.|.+...............................................|
|
||||||
@@ -58,6 +58,9 @@ des.engraving({ coord = { 2,4 }, type = "engrave", text = "Some actions may requ
|
|||||||
des.engraving({ coord = { 2,5 }, type = "engrave", text = "Open the door by moving into it", degrade = false });
|
des.engraving({ coord = { 2,5 }, type = "engrave", text = "Open the door by moving into it", degrade = false });
|
||||||
des.door({ coord = { 2,6 }, state = "closed" });
|
des.door({ coord = { 2,6 }, state = "closed" });
|
||||||
|
|
||||||
|
des.engraving({ coord = { 2,7 }, type = "engrave", text = "Close the door with '" .. nh.eckey("close") .. "'", degrade = false });
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
|
|
||||||
des.engraving({ coord = { 4,5 }, type = "engrave", text = "You can leave the tutorial via the magic portal.", degrade = false });
|
des.engraving({ coord = { 4,5 }, type = "engrave", text = "You can leave the tutorial via the magic portal.", degrade = false });
|
||||||
@@ -98,7 +101,7 @@ des.engraving({ coord = { 19,13 }, type = "engrave", text = "Pick up items with
|
|||||||
|
|
||||||
local armor = (u.role == "Monk") and "leather gloves" or "leather armor";
|
local armor = (u.role == "Monk") and "leather gloves" or "leather armor";
|
||||||
|
|
||||||
des.object({ id = armor, spe = 0, buc = "not-cursed", coord = { 19,14} });
|
des.object({ id = armor, spe = 0, buc = "cursed", coord = { 19,14} });
|
||||||
|
|
||||||
des.engraving({ coord = { 19,15 }, type = "engrave", text = "Wear armor with '" .. nh.eckey("wear") .. "'", degrade = false });
|
des.engraving({ coord = { 19,15 }, type = "engrave", text = "Wear armor with '" .. nh.eckey("wear") .. "'", degrade = false });
|
||||||
|
|
||||||
@@ -115,6 +118,7 @@ des.monster({ id = "lichen", coord = { 23,15 }, waiting = true, countbirth = fal
|
|||||||
|
|
||||||
des.engraving({ coord = { 24,16 }, type = "engrave", text = "Now you know the very basics. You can leave the tutorial via the magic portal.", degrade = false });
|
des.engraving({ coord = { 24,16 }, type = "engrave", text = "Now you know the very basics. You can leave the tutorial via the magic portal.", degrade = false });
|
||||||
|
|
||||||
|
des.engraving({ coord = { 26,16 }, type = "engrave", text = "Step into this portal to leave the tutorial", degrade = false });
|
||||||
des.trap({ type = "magic portal", coord = { 27,16 }, seen = true });
|
des.trap({ type = "magic portal", coord = { 27,16 }, seen = true });
|
||||||
|
|
||||||
--
|
--
|
||||||
@@ -124,6 +128,21 @@ des.object({ id = "boulder", coord = {25,12} });
|
|||||||
|
|
||||||
--
|
--
|
||||||
|
|
||||||
|
des.engraving({ coord = { 27,9 }, type = "engrave", text = "Take off armor with '" .. nh.eckey("takeoff") .. "'", degrade = false });
|
||||||
|
|
||||||
|
--
|
||||||
|
|
||||||
|
des.object({ class = "?", id = "remove curse", buc = "blessed", coord = {23,11} })
|
||||||
|
des.engraving({ coord = { 22,11 }, type = "engrave", text = "Some items have shuffled descriptions, different each game", degrade = false });
|
||||||
|
des.engraving({ coord = { 23,11 }, type = "engrave", text = "Pick up this scroll, read it with '" .. nh.eckey("read") .. "', and try to remove the armor again", degrade = false });
|
||||||
|
|
||||||
|
--
|
||||||
|
|
||||||
|
des.engraving({ coord = { 19,10 }, type = "engrave", text = "Another magic portal, a way to leave this tutorial", degrade = false });
|
||||||
|
des.trap({ type = "magic portal", coord = { 19,11 }, seen = true });
|
||||||
|
|
||||||
|
--
|
||||||
|
|
||||||
des.door({ coord = { 26,14 }, state = "locked" });
|
des.door({ coord = { 26,14 }, state = "locked" });
|
||||||
|
|
||||||
des.engraving({ coord = { 27,14 }, type = "burn", text = "UNDER CONSTRUCTION", degrade = false });
|
des.engraving({ coord = { 27,14 }, type = "burn", text = "UNDER CONSTRUCTION", degrade = false });
|
||||||
|
|||||||
Reference in New Issue
Block a user