Tutorial: going down and up stairs

Adds the second tutorial level, tut-2.lua
This commit is contained in:
Pasi Kallinen
2023-04-16 10:46:00 +03:00
parent dad1c3f8b7
commit d3e48dfad1
7 changed files with 49 additions and 11 deletions

View File

@@ -317,13 +317,17 @@ dungeon = {
},
{
name = "The Tutorial",
base = 1,
base = 2,
flags = { "mazelike", "unconnected" },
levels = {
{
name = "tut-1",
base = 1,
},
{
name = "tut-2",
base = 2,
},
}
},
}

View File

@@ -11,12 +11,12 @@ des.map([[
||.|.|.......|......|-.|....|.F.....|.|.......|.....|.....................|
||.|.|.......|......||.|-.-----------.-.......|-S----.....................|
|-+-S---------..---.||........................|...|.......................|
|......| |.-------------------.......|...|.......................|
|......| ###### |.........| |..S.......|...|.......................|
|----.-| -+- # |.....---.|######+..|.......S...|.......................|
|----+----.----+---.|.--|.|.|# ------------...|.......................|
|........|.|......|.|...F...|# ........|.....+...|.......................|
|.P......-S|......|------.---# .........|.....|...|.......................|
|......| |.-------------------.......|...|....--S----............|
|......| ###### |.........| |..S.......|...|....|.....|............|
|----.-| -+- # |.....---.|######+..|.......S...|....|.....|............|
|----+----.----+---.|.--|.|.|# ------------...|....|.....|............|
|........|.|......|.|...F...|# ........|.....+...|....|.....|............|
|.P......-S|......|------.---# .........|.....|...|....-------............|
|..........|......+.|...|.|.S# ..--S-----.....|LLL|.......................|
|.W......---......|.|.|.|.|.|# ..|......|.....|LLL|.......................|
|....Z.L.S.F......|.|.|.|.---# |......+.....|...|.......................|
@@ -237,9 +237,14 @@ des.door({ coord = { 50,16 }, state = "closed" });
--
des.engraving({ coord = { 55,9 }, type = "burn", text = "UNDER CONSTRUCTION", degrade = false });
des.engraving({ coord = { 58,9 }, type = "burn", text = "Use '" .. nh.eckey("down") .. "' to go down the stairs", degrade = false });
des.stair({ dir = "down", coord = { 58,10 } });
des.trap({ type = "magic portal", coord = { 60,9 }, seen = true });
--
des.engraving({ coord = { 65,3 }, type = "burn", text = "UNDER CONSTRUCTION", degrade = false });
des.trap({ type = "magic portal", coord = { 66,2 }, seen = true });
----------------

27
dat/tut-2.lua Normal file
View File

@@ -0,0 +1,27 @@
des.level_init({ style = "solidfill", fg = " " });
des.level_flags("mazelevel", "noflip",
"nomongen", "nodeathdrops", "noautosearch");
des.map([[
--------------
|............|
|............|
|............|
|............|
|............|
|............|
--------------
]]);
des.region(selection.area(01,01, 73, 16), "lit");
des.stair({ dir = "up", coord = { 2,2 } });
des.engraving({ coord = { 1,1 }, type = "burn", text = "Use '" .. nh.eckey("up") .. "' to go up the stairs", degrade = false });
des.trap({ type = "magic portal", coord = { 11,5 }, seen = true });
des.non_diggable();