mirror of
https://gitlab.com/Oreolek/salet-module.git
synced 2024-06-30 22:05:02 +03:00
Something resembling a story..?
This commit is contained in:
parent
4ca04bb658
commit
c84a1c9def
|
@ -2,8 +2,6 @@ room "world",
|
|||
tags: ["start"],
|
||||
optionText: "Enter the world",
|
||||
ways: ["plaza"]
|
||||
enter: () ->
|
||||
bugg.put(@name)
|
||||
content: """
|
||||
### Rhinestone Room
|
||||
|
||||
|
@ -26,16 +24,19 @@ room "plaza",
|
|||
"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")}
|
||||
"""
|
||||
before: (character, system, from) ->
|
||||
if from == 'world'
|
||||
"""
|
||||
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.
|
||||
"""
|
||||
else
|
||||
"You quickly find the central plaza."
|
||||
content: (character, system) ->
|
||||
retval = "There are #{textlink("people shouting", "people")} nearby."
|
||||
unless character.sandbox.has_mark?
|
||||
retval += "\n\nYou could ask a policeman #{textlink("for directions.", "mark")}"
|
||||
return retval
|
||||
writers:
|
||||
cyclewriter: (character) -> cycle(this, character)
|
||||
mark: (character) ->
|
||||
|
@ -60,17 +61,18 @@ room "shop",
|
|||
|
||||
room "lair",
|
||||
title: "The Lair"
|
||||
before: "Seems like you can't leave this just like that."
|
||||
before: "Finding The Lair is easy. Leaving it is impossible. Your game ends here."
|
||||
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.}}"
|
||||
takeable: false
|
||||
act: () =>
|
||||
here().drop(@name)
|
||||
return "You eat the bugg mass. Delicious and raw."
|
||||
objects: {
|
||||
bugg: obj "bugg",
|
||||
dsc: "You see a particularly beautiful slimy {{bugg.}}"
|
||||
takeable: false
|
||||
act: () =>
|
||||
here().drop(@name)
|
||||
return "You eat the bugg mass. Delicious and raw. Perhaps it's a good lair to live in."
|
||||
}
|
||||
|
||||
dialogue "Yes", "merchant", "merchant", """
|
||||
Yes.
|
||||
|
@ -93,10 +95,16 @@ room "shop-inside",
|
|||
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",
|
||||
dsc: "You see a {{lamp.}}"
|
||||
takeable: true
|
||||
lamp.put("shop-inside")
|
||||
###
|
||||
|
||||
room "merchdialogue",
|
||||
choices: "#merchant",
|
||||
|
|
|
@ -4,6 +4,8 @@ Implies that you don't mix up your tabs and spaces.
|
|||
Copyright 2015 Bruno Dias
|
||||
###
|
||||
normaliseTabs = (text) ->
|
||||
unless text?
|
||||
return ""
|
||||
lines = text.split('\n');
|
||||
indents = lines
|
||||
.filter((l) => l != '')
|
||||
|
@ -23,6 +25,8 @@ normaliseTabs = (text) ->
|
|||
).join('\n')
|
||||
|
||||
markdown = (text) ->
|
||||
unless text?
|
||||
return ""
|
||||
if typeof text is Function
|
||||
text = text()
|
||||
return marked(normaliseTabs(text), {
|
||||
|
|
|
@ -46,7 +46,7 @@ RaconteurSituation.inherits(undum.Situation)
|
|||
Undum API.
|
||||
###
|
||||
|
||||
RaconteurSituation.prototype.act = (character, system, action) =>
|
||||
RaconteurSituation.prototype.act = (character, system, action) ->
|
||||
actionClass = action.match(/^_(\w+)_(.+)$/)
|
||||
that = this
|
||||
|
||||
|
|
Loading…
Reference in a new issue