"The Bridge of Death" by "A. J. Mako" The story headline is "An Interactive Python Sketch". The story genre is "Comedy". The story creation year is 2016. The story description is "This is an adaptation of the scene from Monty Python and the Holly Grail, used exclusively as a learning exercise." Release along with an introductory postcard, cover art, a website, an interpreter, and the source text. Part 1 - Globals Quest continues is a truth state that varies. Questions answered is a number that varies. Final Question is a number that varies. The description of the player is "As resplendent as ever in your regalia as one of the famous Knights of the Round Table." Part 2 - Start Up [Note: We're using a list of numbers to choose the third question, which allows us to give certain questions greater weight.] When play begins: let qVailable be {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 1, 2, 3, 4, 1, 2, 3, 1, 2, 1}; let qTree be a random number between 1 and the number of entries of qVailable; now quest continues is false; now questions answered is 0; now final question is entry qTree of qVailable. [now final question is 11.] Part 3 - The Map Section 1 - Rooms The Edge of the Abyss is a room. "The narrow path leads you to the edge of the Bridge of Death, which provides the only way across the Gorge of Eternal Peril. An eerie mist wanders up from the gorge and surrounds you eerily." The Far Beyond is a room. "The narrow path leads you away from the edge of the Gorge of Eternal Peril. The Bridge of Death provides the only way back across the gorge. An eerie mist wanders up from the gorge and surrounds you eerily." Eternal Peril is a room. "All around you the mist swirls, obscuring the sky, the sides of the gorge, and even the ground. You continue to fall as the peril engulfs you perilously." The Bridge of Death is a door. It is north of The Edge of the Abyss. Through it is the Far Beyond. The Bridge of Death is scenery. The description of the Bridge of Death is "A rotting and dangerous looking bridge across a perilous, mist-filled gorge appears to be the only way to continue your quest." The bridge is open and unopenable. Section 2 - Scenery The gorge is a backdrop. "An eerie mist billows forth, obscuring the bottomless gorge below." The gorge is everywhere. Understand "mist", "gorge", "of", "eternal", or "peril" as the gorge. Understand "edge" or "abyss" as the gorge. The path is a backdrop in the Edge of the Abyss. "The narrow, treacherous path leads back up into that Cave of Caerbannog, away from the bridge." The cavern is a backdrop in the Edge of the Abyss. "The steep, sharp sides of the cavern disappear into the darkness from whence you came." the new path is a backdrop in the Far Beyond. "The narrow, treacherous path leads up into the mist and away from the bridge." Understand "path" as the new path. the new bridge is scenery in the Far Beyond. The description of the new bridge is "A rotting and dangerous looking bridge across a perilous, mist-filled gorge you have just crossed. It no longer prevents you from continuing your quest." Understand "bridge" as the new bridge. Section 3 - Characters The bridgekeeper is a man in the Edge of the Abyss. The initial appearance of the bridgekeeper is "[We] can see the old man from Scene 24 here." The description of the bridgekeeper is "The man is a broken-down example of a human being, with wild hair and blind eyes that peer in different directions and never at [us]." Understand "old", "man", "from", "scene", and "24" as the bridgekeeper. Part 4 - Going Operations Understand "go back" as retreating. Understand "back" or "return" or "retreat" as retreating. Retreating is an action applying to nothing. Carry out retreating: if the location is the Edge of the Abyss, try going up instead; otherwise try going south instead. [The layout from Edge of the Abyss looks like this: North = Bridge of Death South = Rock face of cavern East = Rock face of cavern West = Gorge of Eternal Peril Northeast = Gorge of Eternal Peril Northwest = Gorge of Eternal Peril Southeast = Rock face of cavern Southwest = Back into cave Up = Back into cave Down = Gorge of Eternal Peril ] instead of going nowhere from the Edge of the Abyss: if the noun is south or the noun is southeast or the noun is east: say "There's a solid rock cavern wall blocking your path."; otherwise if the noun is west or the noun is northwest or the noun is northeast or the noun is down: say "There are easier ways to get into the Gorge of Eternal Peril, besides trying to jump down from here."; otherwise: say "You could climb back up the canvern, into the Cave of Caerbannog, but your quest is in the other direction." [The layout from Far Beyond looks like this: North = Continuing the Quest South = Back across the bridge East = Side of the Hill West = Side of the Hill Northeast = Side of the Hill Northwest = Side of the Hill Southeast = Gorge of Eternal Peril Southwest = Gorge of Eternal Peril Up = Continuing the Quest Down = Gorge of Eternal Peril ] instead of going nowhere from the Far Beyond: if the noun is east or the noun is west or the noun is northwest or the noun is northeast: say "The hill is rather steep and difficult to climb. If only there were a path you could follow to make travel easier."; otherwise if the noun is southeast or the noun is southwest or the noun is down: say "There are easier ways to get into the Gorge of Eternal Peril, besides trying to jump down from here."; otherwise if the noun is south: say "You successfully crossed the Bridge of Death, crossing back is as useful as throwing yourself into the Gorge of Eternal Peril."; otherwise: end the story finally saying "Congratulations! Your Quest for the Holy Grail Continues!". instead of going north from the edge of the abyss, try going the bridge of death. Instead of going the bridge of death while quest continues is false: say "'STOP![line break]Who would cross the bridge of death must answer me these questions three, ere the other side he see.' says the Bridgekeeper."; now the command prompt is "What is your name? >". Instead of entering the new bridge in the far beyond, try going south. Part 5 - Talking Operations Instead of telling someone about something, try asking the noun about it. Instead of answering the noun that something, try asking the noun about it. Instead of asking the bridgekeeper about something: if "[the topic understood]" matches the text "grail": say "The bridgekeeper's blind eye stares blankly at you as he says 'Seek you the Bridge of Death.'"; otherwise if "[the topic understood]" matches the text "cave": say "The bridgekeeper's blind eye stares blankly at you as he says 'Heh, heh, heh, heh, heh. We know of a cave; a cave which no man has entered; the Cave of Caerbannog.'"; otherwise if "[the topic understood]" matches the text "bridge": say "The bridgekeeper's blind eye stares blankly at you as he says 'Who would cross the bridge of death must answer me these questions three, ere the other side he see.'"; otherwise if "[the topic understood]" matches the text "gorge" or "[the topic understood]" matches the text "peril": say "The bridgekeeper's blind eye stares blankly at you as he says 'There is much danger, for beyond the cave lies the Gorge of Eternal Peril, which no man has ever crossed.'"; otherwise if "[the topic understood]" matches the text "question": try entering the bridge of death; otherwise: say "The bridgekeeper's blind eye stares blankly at you as he chuckles [one of]gleefully[or]colorfully[or]laughingly[or]wickedly[or]naughtily[purely at random]." Part 6 - Handling Questions To decide whether collecting answers: if the command prompt is ">", no; yes. To complete failed questioning: now the command prompt is ">"; say "The bridgekeeper chuckles gleefully and you are launched into the Gorge of Eternal Peril!"; now the player is in Eternal Peril; end the story finally saying "You succumb to the peril". To complete successful questioning: if the bridgekeeper is in the location, say "The bridgekeeper says: 'Right, off you go.'"; now the command prompt is ">". To complete launching bridgekeeper: say "The bridgekeeper looks surprised and alarmed. 'What? I don't know that!' he says, before being launched into the Gorge of Eternal Peril."; now the bridgekeeper is in Eternal Peril; now quest continues is true; now questions answered is 3. After reading a command when collecting answers: if questions answered is: -- 0: let txtLongName be some text; repeat through the Table of Allowed Names: if "[the player's command]" matches the text "[shortname entry]", now txtLongName is "[fullname entry]"; if txtLongName is not empty: now questions answered is 1; say "The bridgekeeper says: 'Correct. Your name is [txtLongName].'"; now the command prompt is "What is your quest? >"; otherwise: complete failed questioning; say "You might try remembering which knights appeared in the scene."; -- 1: if "[the player's command]" matches the text "grail": choose row final question from the Table of Final Questions; now questions answered is 2; say "The bridgekeeper says: 'Correct. Your quest is the Holy Grail.'"; now the command prompt is "[query entry] >"; otherwise: complete failed questioning; say "I would have thought the answer was obvious. Think 'Monty Python and...'"; -- 2: if there is no answer in row final question of the Table of Final Questions: if the final question is not 5: now quest continues is true; now questions answered is 3; otherwise: choose row final question from the Table of Final Questions; if the final question is 2: if "[the player's command]" matches the regular expression "[answer entry]": now quest continues is true; now questions answered is 3; otherwise if the final question is 3: if "[the player's command in lower case]" matches the text "[answer entry]": complete launching bridgekeeper; otherwise if "[the player's command in lower case]" matches the text "[answer entry]": now quest continues is true; now questions answered is 3; if quest continues is false, complete failed questioning; otherwise complete successful questioning; reject the player's command. Table of Final Questions id query answer 1 "What is your favorite color?" -- 2 "What is the capital of Assyria?" "(?i)assur|nimrud|dur sarukin|nineveh" 3 "What is the airspeed velocity of an unlaiden swallow?" "african or european" 4 "Shall we play a game?" "yes" 5 "Did you ever dance with the devil in the pale moonlight?" -- 6 "Who you gonna call?" "ghostbusters" 7 "You know what they call a Quarter Pounder with cheese in France?" "royale with cheese" 8 "Who framed Roger Rabbit?" "judge doom" 9 "Surely, you can't be serious?" "don't call me shirley" 10 "What is the answer to the ultimate question of life, the universe, and everything?" "42" 11 "How can the net amount of entropy of the universe be massively decreased?" "insufficient data" [The weighted list is used to select the third question. This list gives each question the following chance to be selected: 1 = 17% (11 in 66) = Source: Monty Pythong and the Holy Grail 2 = 15% (11 in 66) = Source: Monty Pythong and the Holy Grail 3 = 14% (11 in 66) = Source: Monty Pythong and the Holy Grail 4 = 12% (11 in 66) = Source: War Games (1983) 5 = 11% (11 in 66) = Source: Batman (1989) 6 = 9% (11 in 66) = Source: Ghostbusters (1984) 7 = 8% (11 in 66) = Source: Pulp Fiction (1994) 8 = 6% (11 in 66) = Source: Who Framed Roger Rabbit? (1988) 9 = 5% (11 in 66) = Source: Airplane! (1980) 10 = 3% (11 in 66) = Source: The Hitchhiker's Guide to the Universe (1978) 11 = 2% (11 in 66) = Source: The Last Question by Isaac Asimov © 1956 INSUFFICIENT DATA FOR MEANINGFUL ANSWER ] Table of Allowed Names shortname fullname "arthur" "Arthur, King of the Britons" "lancelot" "Sir Lancelot of Camelot" "bedevere" "Sir Bedevere of Camelot" "galahad" "Sir Galahad of Camelot" "robin" "Sir Robin of Camelot"