Files
kiln/maps/dark.toml
T

94 lines
2.6 KiB
TOML

[world]
name = "Dark Maze"
start = "cave"
# The player's own torch is small, so external lights clearly matter. Remove this
# line to fall back to the default radius of 10.
torch = 4
[scripts]
# An always-talking object. Placed behind a wall so it starts out of the player's
# field of view — its bubble should draw with NO tail until you can see it.
hidden = """
fn tick(me, dt) {
if !me.waiting {
say("Who's there?");
delay(2.0);
}
}
"""
# A talker placed in the open near the player, so its bubble keeps its tail.
lantern = """
fn init(me) {
say("A warm light\\nflickers here.");
}
fn bump(me, _dir, _by_player) {
say("The lantern\\nglows steadily.");
}
"""
[boards.cave]
name = "The Cave"
width = 40
height = 15
dark = true
floor = { biome = "stone" }
# The 'H' object glows magenta inside a walled chamber: its light fills that room
# but the player can't see in until they line up with the gap in the wall. 'L' is
# an amber lantern out in the open, and 'T' is a wall torch (glowing terrain) off
# in a far corner — a warm point of light you'll only reach by walking to it.
grid = """
########################################
# #
# #
# ########### #
# # # #
# @ # H # L #
# # # #
# #### ###### #
# #
# #
# T #
# #
# #
# #
########################################
"""
[boards.cave.palette]
"#" = { type = "builtin", kind = "wall" }
"@" = { type = "player" }
# A wall torch. There is no `torch` builtin — a light source is just an object
# with a `glow` radius and no script.
[boards.cave.palette.T]
type = "object"
enter = "block"
glow = 4
tile = "*"
fg = "#ffaa33"
bg = "#000000"
# Glows magenta inside the walled chamber: its light fills that room, but the
# player cannot see in until they line up with the gap in the south wall.
[boards.cave.palette.H]
type = "object"
script = "hidden"
name = "hidden"
enter = "block"
glow = 5
tile = "☻" # CP437 2 — `tile = 2` is equivalent
fg = "#cc66cc"
bg = "#000000"
# An amber lantern out in the open, near the player.
[boards.cave.palette.L]
type = "object"
script = "lantern"
name = "lantern"
enter = "block"
glow = 6
tile = "☼" # CP437 15
fg = "#ffcc55"
bg = "#000000"