1
0
Fork 0
mirror of https://gitlab.com/Oreolek/salet.git synced 2024-06-01 07:48:20 +03:00
salet/game/story.coffee

84 lines
2.5 KiB
CoffeeScript

room "world",
tags: ["start"],
optionText: "Enter the world",
ways: ["plaza"]
enter: () ->
bugg.put(@name)
content: """
### Rhinestone Room
You're in a large room carved inside a giant milky rock mountain.
The floor and walls are littered with signs and signatures of the previous visitors.
A steep narrow #{textlink("well", "well")} proceeds upward.
"""
writers:
well: "There is only one passage out. See the „Other rooms“ block popped up? Click it."
room "plaza",
title: (from) ->
if from == "world"
return "Upwards"
else
return "Town plaza"
cycle_gallery: () -> # it needs to be a function if you want localization
return [
"quirky", "distinct", "kooky", "crazy", "quaint"
]
ways: ["shop"]
before: () ->
"""
You climb up the well and come out to a central plaza of a #{cyclelink("quaint")} little town.
A plaque nearby says it's the town of *Innsmouth,* wherever that is.
"""
content: """
There are #{textlink("people shouting", "people")} nearby.
You could ask a policeman #{textlink("for directions.", "mark")}
"""
writers:
cyclewriter: (character) -> cycle(this, character)
mark: (character) ->
if character.sandbox.has_mark?
return "You already talked to him, no need to bug the man twice."
character.sandbox.has_mark ?= true
get_room("lair").destination()
"""
“Here, let me mark it on your map.”
"""
people: 'Just some weirdos shouting "Viva la Cthulhu!". Typical.'
room "shop",
title: "The Shop"
ways: ["plaza", "shop-inside", "lair"]
content: """
Being the only shop in town, this trendy establishment did not need a name.
It's an open question why it had one, especially because its name was "Hung Crossing".
You are standing in front of a picturesque sign. It's cold here.
"""
room "lair",
title: "The Lair"
before: "Seems like you can't leave this just like that."
content: """
The Lair of Yog-Sothoth is a very *n'gai* cave, full of *buggs-shoggogs* and *n'ghaa ng'aa*.
"""
bugg = obj "bugg-shoggog",
dsc: "You see a particularly beautiful slimy {{bugg.}}"
act: () =>
here().drop(@name)
return "You eat the bugg mass. Delicious and raw."
room "shop-inside",
ways: ["shop"]
title: "Inside the Shop"
content: """
The insides are painted pastel white, honouring The Great Milk Spill of 1985.
"""
lamp = obj "lamp",
dsc: "You see a {{lamp.}}"
takeable: true