1
0
Fork 0
mirror of https://gitlab.com/Oreolek/black_phone.git synced 2024-07-03 07:15:10 +03:00
black_phone/game/story.coffee

216 lines
7.1 KiB
CoffeeScript
Raw Normal View History

2015-12-29 08:56:27 +02:00
update_ways = (ways) ->
content = ""
for way in ways
if undum.game.situations[way]?
content += way_to(undum.game.situations[way].title, way)
$("#ways").html(content)
2015-12-30 08:08:10 +02:00
# the code is the day she met her lover
# if the player enters the code prior to learning the birthday, the game responds accordingly
# when he wants to go, there's someone at rge door
# it's another thief (someone who is at ease with Ana's Instagram too) who took out Petya
# the Black Phone can deal with him
2015-12-29 08:56:27 +02:00
situation "living-room",
title: "Living room"
before: () ->
if not $(".ways h2").is(':visible')
$(".ways h2").fadeIn()
update_ways(this.ways)
ways: ["bedroom", "kitchen"]
content: """
Ronald is standing in a dark room with a big #{textlink("window.", "window")}
The walls are covered with a dingy rose wallpaper.
The room is very unnerving.
Was it actually her home?
On a coffee table lies an opened envelope.
#{textlink("A book stand", "bookcase")} is hanging above #{textlink("a television set.", "tv")}
Oh, and the door Ronald came into the apartment is there, too.
"""
writers:
window: "The moon is full today. It illuminates the flat, makes the things stand out in some weird angles."
bookcase: """
Either Anastacia has a very conflicting taste in books, or she has no taste at all. Let's see...
#{textlink("“Master and Margarita”,", "bulgakov")}
#{textlink("“Breakfast at Tiffany's”,", "tiffanys")}
#{textlink("The Soviet Encyclopedic Dictionary,", "dictionary")}
#{textlink("“Grey”,", "grey")}
#{textlink("”Also sprach Zarathustra”,", "zaratustra")}
#{textlink("”Poker with sharks”,", "dontzova")}
#{textlink("”Classic sauce. Culinary collection”", "culinary")}
and #{textlink("The Bible.", "bible")}
"""
bulgakov: """
Master and Margarita by Mikhail Bulgakov.
A famous urban fantasy satire of Soviet nineteen-thirties.
This is a cheap paperback edition, she read this at least a couple of times.
The pages have dog's ears, and coffee stains too.
Ronald can even see a hint of lipstick smearing the episode of Satan's dark magic variety show performance.
"""
tiffanys: """
This book looks scrawny wedged between the fat dictionary and an epic novel.
It looks rather new, the pages are still white and straight.
Maybe she didn't catch the right moment to read this.. or maybe just forgot about it.
"""
dictionary: "A big fat dictionary of everything, issued in 1989. Nobody reads every page of these. Ronald doubts Anastacia got to read at least one page."
grey: "Fifty Shades of Grey, an unnecessary remake. Now from a psychopath's point of view. And she actually read that."
zaratustra: (character, system) ->
money(character, system, 20000)
"""
Nietsche's four-part novel about The Man, The Superman and everything in-between.
It's surprisingly worn down.
She took this book out a lot.
Was she secretly a philosophy nut?
An Übermensch dreamer?
No, of course not.
Ronald opens the book and finds a stash of money inside.
"""
dontzova: """
An "ironic detective" by Daria Dontzova about Evlampia Romanova, an amateur detective.
The heroine (nicknamed as Lamp) plays harp and solves murders.
It's a trash book filled with blatant product placement.
"""
culinary: "An old culinary book. Nothing about it."
bible: "An Orthodox Christian Bible, Old Testament. A decent hardcover edition. Bookmarked at the Sodom episode."
tv: "An expensive 40-something inch TV standing on a stylish black stand. The room looks kinda small for that monster."
situation "bedroom",
before: () ->
update_ways(this.ways)
title: "Bedroom"
ways: ["living-room", "kitchen"]
2015-12-30 08:08:10 +02:00
content: (character, system) ->
return """
The bedroom is spacious. There's a wardrobe and a big bed.
#{if character.sandbox.box_opened == 0
"On a small table near the bed is an ornate #{way_to("wooden box.", "box")}"
}
"""
2015-12-29 08:56:27 +02:00
situation "kitchen",
before: () ->
update_ways(this.ways)
title: "Kitchen"
ways: ["living-room", "bedroom"]
content: """
Bedroom here
"""
2015-12-30 08:08:10 +02:00
situation "box",
before: () ->
update_ways(this.ways)
ways: ["bedroom"]
choices: "#box"
content: (character, system) ->
return """
It's a red wood, very expensive.
And this box is locked with a digital code key.
#{if is_visited(this) == 0
"""
Ronald takes out a vial from his pocket. He coats the keys with a bright white powder.
Only 1, 2, 3, 7 and 0 keys are fingerprinted.
He wipes the box clean until there is no trace of the powder.
"""
}
"""
# no need to call update_ways, it's the same location
situation "smash",
canView: (character) ->
character.sandbox.view_smash == 1
optionText: "Smash the box"
before: (character) ->
character.sandbox.view_smash = 0
choices: "#box"
tags: ["box"]
content: "Ronald still needs the phone in this box. A very high-tech fragile phone. Smashing isn't an option."
situation "put1",
choices: "#box"
tags: ["box"]
optionText: "Enter 1"
before: (character) ->
code_input(character, 1)
canChoose: (character) ->
code_can_input(character)
after: (character, system) ->
code_check(character, system)
content: (character) -> """
Ronald presses button 1. The display is #{character.sandbox.code} now.
"""
situation "put2",
choices: "#box"
tags: ["box"]
optionText: "Enter 2"
before: (character) ->
code_input(character, 2)
after: (character, system) ->
code_check(character, system)
canChoose: (character) ->
code_can_input(character)
content: (character) -> """
Ronald presses button 2. The display is #{character.sandbox.code} now.
"""
situation "put3",
choices: "#box"
tags: ["box"]
optionText: "Enter 3"
before: (character) ->
code_input(character, 3)
after: (character, system) ->
code_check(character, system)
canChoose: (character) ->
code_can_input(character)
content: (character) -> """
Ronald presses button 3. The display is #{character.sandbox.code} now.
"""
situation "put7",
choices: "#box"
tags: ["box"]
optionText: "Enter 7"
before: (character) ->
code_input(character, 7)
after: (character, system) ->
code_check(character, system)
canChoose: (character) ->
code_can_input(character)
content: (character) -> """
Ronald presses button 7. The display is #{character.sandbox.code} now.
"""
situation "put0",
choices: "#box"
tags: ["box"]
optionText: "Enter 0"
before: (character) ->
code_input(character, 0)
after: (character, system) ->
code_check(character, system)
canChoose: (character) ->
code_can_input(character)
content: (character) -> """
Ronald presses button 0. The display is #{character.sandbox.code} now.
"""
situation "reset",
choices: "#box"
tags: ["box"]
optionText: "Reset the display"
before: (character) ->
code_reset(character)
content: """
You press Backspace until the display is empty.
"""