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

108 lines
3.3 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
"""
2016-01-18 13:29:34 +02:00
objects:
well: 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."
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."
2016-01-18 13:29:34 +02:00
objects:
policeman: obj "policeman",
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.
"""
people: obj "people",
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
"""
objects:
2016-01-16 19:24:02 +02:00
bugg: obj "bugg",
dsc: "You see a particularly beautiful slimy {{bugg.}}"
takeable: false
2016-02-01 10:51:48 +02:00
act: (salet) =>
salet.here().drop(@name)
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
dialogue "Yes", salet, "merchant", "merchant", """
2016-01-16 19:04:00 +02:00
Yes.
"""
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
"""
objects:
2016-01-16 19:04:00 +02:00
merchant: obj "merchant",
dsc: "A {{merchant}} eyes you warily."
takeable: false
2016-02-01 10:51:48 +02:00
act: (system) =>
salet.processClick("merchdialogue")
2016-01-16 19:04:00 +02:00
return ""
2016-01-16 08:26:25 +02:00
2016-01-16 19:24:02 +02:00
###
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.
2016-01-16 08:26:25 +02:00
lamp = obj "lamp",
dsc: "You see a {{lamp.}}"
2016-01-16 18:43:20 +02:00
takeable: true
2016-01-16 19:04:00 +02:00
lamp.put("shop-inside")
2016-01-16 19:24:02 +02:00
###
2016-01-16 19:04:00 +02:00
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?
"""