! Road of Darkness
!! By [[Aster Fialla | https://asterfialla.com]]
This is an implementation of the Road of Darkness specification I made up. It's implemented in [[Twine's|https://twinery.org]] [[Sugarcube 2|https://www.motoslave.net/sugarcube/2]] story format.
I release the text of the specification to the public domain (though credit is appreciated).
The license to the text and source code of this implementation in Twine is [[CC-BY-SA | https://creativecommons.org/licenses/by-sa/4.0/]]. Feel free to make your own implementation of the specification with new text/code and a different license if you want.
[[Play| Crossroad]]
[[Specification]]
<<set $knows_tag to false>>
<<set $knows_cloak to false>>
<<set $knows_thief to false>>
<<set $scarf to "white">>! Specification
!! Premise:
Our heroic adventurer finds themself on a difficult road.
!! Details
The game begins in a forest. You stand before a crossroads that splits to the left and right. There is a man standing next to the path on the right, wearing a large, black, velvet cloak.
These elements can be examined at the crossroads.
* The ''left path'' is well-lit and inviting.
* The ''right path'' is shadowy and scary-looking.
* The ''man'' has a generally suspicious manner.
* The ''cloak'' is magically absorbing the light on the right path.
You are wearing a scarf, and can pick what color the scarf is.
You can start a conversation with the man at the crossroads. All conversation options with the man can be explored, and you can leave the conversation at any time.
* //Ask about the left path//: he will talk up how interesting and pretty it is, and encourages you to go that way.
* //Ask about the right path//: he will say the same thing as with the left path.
* //Ask about himself//: he will try to pass himself off as friendly, but it's clear that he's a dastardly thief with a dagger under the cloak.
* //Ask about the cloak//: he will only say it has very special properties. You realize the cloak has a tag that reads "Pull to turn off".
These choices can be taken at any time, and lead to the endings. You can't return to the crossroads once taking them.
* //Take the right path.//
* //Take the left path.//
* (Hidden at the start): If you both examine the ''cloak'' and //Ask the man about himself//, it will unlock the option to //Steal the cloak and run//.
!!! ENDINGS
All endings should reference the scarf and its color in some way.
If you //take the left path// or //take the right path// (it doesn't matter):
* If you haven't //asked about himself//, he follows you down the path, which magically darkens around you. He stabs and mugs you, and you die.
* If you have //asked about himself//, you are ready for his attack and dodge it. You disarm his dagger and escape safely.
If you //steal the cloak and run//:
* If you haven't //asked about the cloak//, you get lost in the woods as they darken around you. You ditch the cloak to be able to see again.
* If you have //asked about the cloak//, you pull the tab and the magical darkness effect turns off, allowing you to escape the forest safely with the cloak.
[[Back | Start]]You're walking down the forest in autumn. The trees are dressed in a variety of bright colors: yellow, red, orange, even flashing a rare purple here and there. A crisp wind at your back seems to push you further along, and the leaves crunch satisfyingly under your boots. You are wearing a fetching <<cycle "$scarf" autoselect>>
<<option "white">>
<<option "blue">>
<<option "pink">>
<<option "green">>
<</cycle>> scarf of high-quality wool lace, which keeps you warm and stylish.
You see an upcoming fork in the road ahead, branching [[left | Left path]] and [[right | Right path]]. There is a [[man | Man]] standing a few steps along the right path. He's wearing a large, black velvet [[cloak | Cloak]].
[[Talk to the man | Conversation]]
[[Take the left path | Take path][$direction to "left"]]
[[Take the right path | Take path][$direction to "right"]]
<<if $knows_thief is true && $knows_cloak is true>>[[Steal the cloak and run | Steal cloak]]<</if>>The sunshine dances and twirls through the trees on the left path. The leaves make a thick, flat mat on the forest floor, as if many feet have crossed this way.
[[Back | Crossroad]]The sunbeams seem to be swallowed up by this path, in a rather unnatural manner. The tree branches bend like crooked fingers, beckoning you into the shadows.
[[Back | Crossroad]]The man is wearing a large black [[cloak | Cloak]] which mostly obscures his form. His eyes dart about quickly, scanning the surroundings and sizing you up.
[[Back | Crossroad]]The cloak shifts strangely. The sunshine warps and distorts as it touches the cloak, and you realize that it's magically absorbing the light around it, causing the right path's uncanny darkness.
<<set $knows_cloak to true>>
[[Back | Crossroad]]The man smiles widely as you approach. "Hello, my friend! How do you do on this lovely autumn day?" He looks up and down at your outfit with a slight gleam in his eye. "I love your scarf. What a beautiful color!"
[[Ask about the left path | Ask about path]]
[[Ask about the right path | Ask about path]]
[[Ask about himself]]
[[Ask about cloak]]
[[Back | Crossroad]]"Oh yes, lovely walk," he says, nodding. "Definitely take a look, it's beautiful down there!"
[[Back to conversation | Conversation]]
[[Back to crossroad | Crossroad]]The man's eyes crinkle in a calculated manner as he grins. "Ah, just a traveler passing through! Pay no mind to me..."
Why is he just standing on the road in the dark, though? You eye him suspiciously and he starts to fidget and frown. The cloak shifts slightly, and you catch a glimpse of a dagger at his hip. He must be a brigand!
You do your best to school your expression and smile placidly. The man relaxes.
<<set $knows_thief to true>>
[[Back to conversation | Conversation]]
[[Back to crossroad | Crossroad]]The man squints and draws the cloak closer around himself. "It's a very special cloak..." He refuses to elaborate, but as the cloak wraps around him, you notice a small white tag sticking out of the collar. It reads, "Pull to turn off".
<<set $knows_tag to true>>
[[Back to conversation | Conversation]]
[[Back to crossroad | Crossroad]]<<if $direction is "left">>\
You start to walk down the left path, which looked the most warm and inviting. Suddenly the path darkens around you to almost pitch black, and you hear the leaves crunch loudly right behind you!
<<elseif $direction is "right">>\
You start to walk down the right path, which looks secret and intriguing. Suddenly the path becomes even darker, almost pitch black, and you hear the leaves crunch loudly right behind you!
<</if>>\
<<if $knows_thief>>\
You dive to the side suddenly as the thief attacks the space you were in. Through the shadows, you can barely see him swiping this way and that. You stick out a leg, and he trips with a large thud. Seeing the flash of the dagger's blade, you pick it up and dart away from him. As you run further, your $scarf scarf whipping behind you, the path lightens up back into the cheerful-looking wood.
''****************You were sufficiently prepared.****************''
<<else>>\
You let out a short gasp as a cold blade pierces your abdomen, and collapse on the ground with a thud. The last thing you're aware of, as you bleed out and fade from the land of the living, is the man unwinding the $scarf scarf from your neck and snickering softly.
''****************You were a fool.****************''
<</if>>\
[[Start over | Start]]You jump forward and rip the cloak from the man's shoulders, then dart down a random path. The shadows deepen around you as soon as you put it on. He shouts and tries to run after you, but you're quick, and the shroud of shadows hides your movement. Soon his cries and footsteps fade. However, he's not the only one who can't navigate in the dark!
<<if $knows_tag is true>>\
Luckily, you remember the tag that you saw on the cloak earlier. You fumble for it, and give a sharp tug. The elastic tag stays on, but the darkness dissipates, leaving you standing in the forest surrounded by warm light once more. Relieved that the danger has passed, you throw your scarf over the cloak and arrange it nicely. You feel the black and $scarf look quite fashionable together.
''****************You obtained a cloak of darkness.****************''
<<else>>\
As you stumble around, you realize you're hopelessly lost, and have to abandon the cloak if you're ever going to get out of the wood without dying. You drop it in a bush and remorsefully walk away. As you make your way along, wrapping your $scarf scarf tighter around you, the path soon lightens up back into the cheerful-looking wood.
''****************You lost a cloak of darkness.****************''
<</if>>
[[Start over | Start]]