You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

120 lines
2.9 KiB

## REAL ROOM
room "start",
clear: false
before: (from) ->
if (!from)
salet.character.beat = 0
state.setTag("weather", "warm")
audio = document.getElementById("bgsound")
audio.currentTime = 0
audio.volume = 0.5
audio.play()
return "intro".l()
dsc: () -> "dsc".l(Improv, state)
afterChoices: () ->
if (
salet.character.lastBeat() > 3 and
salet.character.killed != true and
salet.character.knows_margo and
salet.character.knows_alexey
)
salet.character.killed = true
salet.character.beat = salet.progress.sequence.length
salet.goTo("killed")
writers:
window: () ->
# re-enter the room, reroll the description
salet.view.clearContent()
salet.here().entering("start")
return "<em>"+procgen("window")+"</em>"
canExit: (to) ->
if salet.character.killed and (to == "margo" or to == "alexey")
salet.view.clearContent()
salet.view.append("<em>"+"#{to}_reaction".l()+"</em>")
return false
## ACTUALLY DIALOGUES
dlg = (name) ->
return room(name, {
before: () ->
if salet.character["knows_#{name}"] != true
salet.character["knows_#{name}"] = true
return "meet_#{name}".l()
choices: "##{name}",
dsc: () ->
"#{name}_dsc".l(Improv, state)
})
dlg_bye = (name) ->
return room("#{name}_bye", {
clear: false
tags: [name]
optionText: "bye".l()
dsc: "#{name}_bye".l()
after: () ->
return salet.goTo("start")
})
dlg("alexey")
dlg("margo")
dialogue "alexey_mood".l(), "alexey", "alexey", "alexey_mood_answ".l()
dialogue "alexey_speed".l(), "alexey", "alexey", "alexey_speed_answ".l()
dlg_bye("alexey")
dlg_bye("margo")
room "killed",
clear: false
choices: "#killed"
dsc: "story_call".l()
room "killed2",
clear: false
optionText: "killed2_option".l()
dsc: "killed2".l()
tags: ["killed"]
choices: "#killed"
canView: () ->
true if !salet.isVisited("killed2")
room "killed3",
clear: false
optionText: "killed3_option".l()
dsc: "killed3".l()
tags: ["killed"]
choices: "#killed"
canView: () ->
true if salet.isVisited("killed2") and !salet.isVisited("killed3")
room "killed4_a",
clear: false
optionText: "killed4_option_a".l()
dsc: "killed4_a".l()
tags: ["killed"]
choices: "#killed"
canView: () ->
true if salet.isVisited("killed3") and !salet.isVisited("killed4_b")
room "killed4_b",
clear: false
optionText: "killed4_option_b".l()
dsc: "killed4_b".l()
tags: ["killed"]
choices: "#killed"
canView: () ->
true if salet.isVisited("killed3") and !salet.isVisited("killed4_a")
room "killed5",
clear: false
enter: () ->
state.setTag("weather", "cold")
optionText: "killed5_option".l()
dsc: "killed5".l()
tags: ["killed"]
canView: () ->
true if salet.isVisited("killed4_a") or salet.isVisited("killed4_b")
after: () ->
return salet.goTo("start")