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

125 lines
3.6 KiB
CoffeeScript
Raw Normal View History

room "world", salet,
2016-01-16 08:26:25 +02:00
tags: ["start"],
optionText: "Enter the world",
2016-01-15 17:29:15 +02:00
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.
2016-01-15 03:06:03 +02:00
"""
units: [
unit "well",
2016-01-18 13:29:34 +02:00
dsc: "A steep narrow {{well}} proceeds upward."
act: "There is only one passage out. See the „Other rooms“ block popped up? Click it."
]
2016-01-15 03:06:03 +02:00
room "plaza", salet,
2016-01-15 17:29:15 +02:00
title: (from) ->
if from == "world"
return "Upwards"
else
return "Town plaza"
cycle: ["quirky", "distinct", "kooky", "crazy", "quaint"]
2016-01-15 17:29:15 +02:00
ways: ["shop"]
2016-02-01 10:51:48 +02:00
before: (system, from) ->
2016-01-16 19:24:02 +02:00
if from == 'world'
"""
2016-02-01 17:16:36 +02:00
You climb up the well and come out to a central plaza of a #{system.view.cycleLink("quaint")} little town.
2016-01-16 19:24:02 +02:00
A plaque nearby says it's the town of *Innsmouth,* wherever that is.
"""
else
"You quickly find the central plaza."
units: [
unit "policeman",
2016-01-18 13:29:34 +02:00
dsc: "There is a policeman nearby. You could ask him {{for directions.}}"
2016-02-01 10:51:48 +02:00
act: (salet) ->
if salet.character.has_mark?
2016-01-18 13:29:34 +02:00
return "You already talked to him, no need to bug the man twice."
2016-02-01 10:51:48 +02:00
salet.character.has_mark ?= true
salet.getRoom("lair").destination()
2016-01-18 13:29:34 +02:00
"""
Here, let me mark it on your map.
"""
unit "people",
2016-01-18 13:29:34 +02:00
dsc: "There are {{people shouting}} nearby."
act: 'Just some weirdos shouting "Viva la Cthulhu!". Typical.'
]
2016-01-15 17:29:15 +02:00
room "shop", salet,
2016-01-15 17:29:15 +02:00
title: "The Shop"
2016-01-20 01:56:10 +02:00
#pic: "http://loremflickr.com/640/300/room,shop"
ways: ["plaza", "shop-inside", "lair"]
dsc: """
2016-01-15 17:29:15 +02:00
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.
2016-01-15 03:06:03 +02:00
"""
room "lair", salet,
2016-01-15 17:29:15 +02:00
title: "The Lair"
2016-01-16 19:24:02 +02:00
before: "Finding The Lair is easy. Leaving it is impossible. Your game ends here."
dsc: """
2016-01-15 17:29:15 +02:00
The Lair of Yog-Sothoth is a very *n'gai* cave, full of *buggs-shoggogs* and *n'ghaa ng'aa*.
2016-01-15 03:06:03 +02:00
"""
ways: ["shop"]
units: [
unit "bugg",
2016-01-16 19:24:02 +02:00
dsc: "You see a particularly beautiful slimy {{bugg.}}"
takeable: false
2016-02-01 10:51:48 +02:00
act: (salet) =>
2016-03-20 14:41:47 +02:00
salet.rooms[salet.current].drop("bugg")
2016-01-16 19:24:02 +02:00
return "You eat the bugg mass. Delicious and raw. Perhaps it's a good lair to live in."
]
2016-01-16 08:26:25 +02:00
2016-02-24 14:45:02 +02:00
phrase "Yes", salet, "merchant", """
2016-01-16 19:04:00 +02:00
Yes.
"""
2016-02-24 14:45:02 +02:00
dialogue "No", salet, "merchant", "merchant", """
No.
"""
2016-03-20 14:41:47 +02:00
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.
"""
2016-01-16 19:04:00 +02:00
room "shop-inside", salet,
2016-01-16 08:26:25 +02:00
ways: ["shop"]
2016-01-16 19:04:00 +02:00
tags: ["merchant"]
optionText: "End the conversation"
2016-01-16 08:26:25 +02:00
title: "Inside the Shop"
dsc: """
The insides are painted pastel white, honouring The Great Milk Spill of 1985.
2016-01-16 08:26:25 +02:00
"""
units: [
unit "merchant",
2016-01-16 19:04:00 +02:00
dsc: "A {{merchant}} eyes you warily."
takeable: false
2016-02-10 15:35:44 +02:00
act: (salet) =>
2016-02-01 10:51:48 +02:00
salet.processClick("merchdialogue")
2016-01-16 19:04:00 +02:00
return ""
]
2016-01-16 08:26:25 +02:00
lamp = unit "lamp",
2016-01-16 18:43:20 +02:00
takeable: true
lamp.put(salet, "shop-inside")
2016-01-16 19:04:00 +02:00
2016-02-24 14:45:02 +02:00
# The dialogue entry point has to be a room, in order to have an ID to go to.
room "merchdialogue", salet,
2016-01-16 19:04:00 +02:00
choices: "#merchant",
dsc: """
2016-01-16 19:04:00 +02:00
Nice day, isn't it?
"""