mirror of
https://gitlab.com/Oreolek/salet.git
synced 2024-07-07 01:04:25 +03:00
131 lines
3.8 KiB
CoffeeScript
131 lines
3.8 KiB
CoffeeScript
room "world", salet,
|
|
tags: ["start"],
|
|
optionText: "Enter the world",
|
|
ways: ["plaza"]
|
|
dsc: """
|
|
### 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.
|
|
"""
|
|
objects: [
|
|
obj "well",
|
|
dsc: "A steep narrow {{well}} proceeds upward."
|
|
act: "There is only one passage out. See the „Other rooms“ block popped up? Click it."
|
|
]
|
|
|
|
room "plaza", salet,
|
|
title: (from) ->
|
|
if from == "world"
|
|
return "Upwards"
|
|
else
|
|
return "Town plaza"
|
|
cycle: ["quirky", "distinct", "kooky", "crazy", "quaint"]
|
|
ways: ["shop"]
|
|
before: (system, from) ->
|
|
if from == 'world'
|
|
"""
|
|
You climb up the well and come out to a central plaza of a #{system.view.cycleLink("quaint")} little town.
|
|
A plaque nearby says it's the town of *Innsmouth,* wherever that is.
|
|
"""
|
|
else
|
|
"You quickly find the central plaza."
|
|
objects: [
|
|
obj "policeman",
|
|
dsc: "There is a policeman nearby. You could ask him {{for directions.}}"
|
|
act: (salet) ->
|
|
if salet.character.has_mark?
|
|
return "You already talked to him, no need to bug the man twice."
|
|
salet.character.has_mark ?= true
|
|
salet.getRoom("lair").destination()
|
|
"""
|
|
“Here, let me mark it on your map.”
|
|
"""
|
|
obj "people",
|
|
dsc: "There are {{people shouting}} nearby."
|
|
act: 'Just some weirdos shouting "Viva la Cthulhu!". Typical.'
|
|
]
|
|
|
|
room "shop", salet,
|
|
title: "The Shop"
|
|
#pic: "http://loremflickr.com/640/300/room,shop"
|
|
ways: ["plaza", "shop-inside", "lair"]
|
|
dsc: """
|
|
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", salet,
|
|
title: "The Lair"
|
|
before: "Finding The Lair is easy. Leaving it is impossible. Your game ends here."
|
|
dsc: """
|
|
The Lair of Yog-Sothoth is a very *n'gai* cave, full of *buggs-shoggogs* and *n'ghaa ng'aa*.
|
|
"""
|
|
ways: ["shop"]
|
|
objects: [
|
|
obj "bugg",
|
|
dsc: "You see a particularly beautiful slimy {{bugg.}}"
|
|
takeable: false
|
|
act: (salet) =>
|
|
salet.rooms[salet.current].drop("bugg")
|
|
return "You eat the bugg mass. Delicious and raw. Perhaps it's a good lair to live in."
|
|
]
|
|
|
|
phrase "Yes", salet, "merchant", """
|
|
Yes.
|
|
"""
|
|
dialogue "No", salet, "merchant", "merchant", """
|
|
No.
|
|
"""
|
|
room "sell-lamp", salet,
|
|
ways: ["shop"]
|
|
tags: ["merchant"]
|
|
choices: ["#merchant"]
|
|
optionText: "May I buy this lamp?"
|
|
title: "Talking with merchant"
|
|
canView: (salet) ->
|
|
return salet.character.has("lamp") and salet.character.bought_lamp == false
|
|
enter: (salet) ->
|
|
salet.character.bought_lamp = true
|
|
dsc: """
|
|
"That'll be 30 pieces of your time."
|
|
|
|
You quickly pay the price and take the lamp as a rightful owner.
|
|
"""
|
|
|
|
room "shop-inside", salet,
|
|
ways: ["shop"]
|
|
tags: ["merchant"]
|
|
optionText: "End the conversation"
|
|
title: "Inside the Shop"
|
|
dsc: """
|
|
The insides are painted pastel white, honouring The Great Milk Spill of 1985.
|
|
"""
|
|
objects: [
|
|
obj "merchant",
|
|
dsc: "A {{merchant}} eyes you warily."
|
|
takeable: false
|
|
act: (salet) =>
|
|
salet.processClick("merchdialogue")
|
|
return ""
|
|
]
|
|
|
|
###
|
|
I want to be able to do this but I can't because I'm lost in all the `this` and @objects and `new`.
|
|
The chain of calls is very weird and this puts an object IN EVERY ROOM for God's sake.
|
|
I need someone smarter than me to fix this.
|
|
###
|
|
|
|
lamp = obj "lamp",
|
|
takeable: true
|
|
lamp.put(salet, "shop-inside")
|
|
|
|
# The dialogue entry point has to be a room, in order to have an ID to go to.
|
|
room "merchdialogue", salet,
|
|
choices: "#merchant",
|
|
dsc: """
|
|
Nice day, isn't it?
|
|
"""
|