housekeeping and quit choices
This commit is contained in:
parent
99ddd28bc8
commit
e99390deb3
@ -1,8 +1,10 @@
|
|||||||
|
|
||||||
function game_end()
|
function game_end()
|
||||||
while true
|
while true
|
||||||
print("Your quest ends here. Or does it?\n\n")
|
print("Your quest ends here. Or does it?\n\n")
|
||||||
|
|
||||||
choice = input("Would you like to restart your quest? Y/N: ")
|
choice = input("Would you like to restart your quest? Y/N: ")
|
||||||
|
|
||||||
if choice == "Y"
|
if choice == "Y"
|
||||||
main()
|
main()
|
||||||
elseif choice == "y"
|
elseif choice == "y"
|
||||||
@ -17,25 +19,30 @@ function game_end()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function dui()
|
function dui()
|
||||||
|
|
||||||
print("Here are your options. \n")
|
print("Here are your options. \n")
|
||||||
print("Option 1 - Go to your local Safeway. \n")
|
print("Option 1 - Go to your local Safeway. \n")
|
||||||
print("Option 2 - Go to the closest gas station. \n")
|
print("Option 2 - Go to the closest gas station. \n")
|
||||||
|
|
||||||
choice = input("Choose an option by pressing its number: ")
|
choice = input("Choose an option by pressing its number: ")
|
||||||
|
|
||||||
if choice == "1"
|
if choice == "1"
|
||||||
print("The cops pull you over and smell malt liquor on your breath.
|
print(dui_car_option1,"\n")
|
||||||
You have gotten a DUI. \n")
|
game_end()
|
||||||
main()
|
|
||||||
elseif choice == "2"
|
elseif choice == "2"
|
||||||
print("The cops pull you over and smell malt liquor on your breath.
|
print("The cops pull you over and smell malt liquor on your breath.
|
||||||
You have gotten a DUI. \n")
|
You have gotten a DUI. \n")
|
||||||
main()
|
game_end()
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function leavehouse()
|
function leavehouse()
|
||||||
print("You get in your car to find glass bottled Sun Drop. \n")
|
print("You get in your car to find glass bottled Sun Drop. \n")
|
||||||
end
|
end
|
||||||
|
29
lib/story.jl
29
lib/story.jl
@ -2,21 +2,42 @@ include("../lib/io-extra.jl")
|
|||||||
|
|
||||||
# Stats (character names, character statistics etc)
|
# Stats (character names, character statistics etc)
|
||||||
character_name="You"
|
character_name="You"
|
||||||
|
wrong_key_error = "That option is invalid"
|
||||||
|
|
||||||
# Text to be included in scenes
|
# Text to be included in scenes
|
||||||
|
|
||||||
|
# GENERAL TEXTS
|
||||||
intro_text = "$character_name woke up thirsty, hankering for a delicious citrus beverage.\n"
|
intro_text = "$character_name woke up thirsty, hankering for a delicious citrus beverage.\n"
|
||||||
intro_option1outcome_text = "You die of dehydration.\n"
|
|
||||||
|
|
||||||
|
# GENERAL OUTCOMES
|
||||||
|
|
||||||
|
|
||||||
intro_option2outcome_text = "In the fridge, you find a half-filled plastic 2 liter
|
intro_option2outcome_text = "In the fridge, you find a half-filled plastic 2 liter
|
||||||
bottle of delicious Sun Drop, a 40 oz King Cobra, and purple drink.\n"
|
bottle of delicious Sun Drop, a 40 oz King Cobra, and purple drink.\n"
|
||||||
|
|
||||||
fridge_option1outcome_text = "This does not satisfy your thirst, so you decide
|
fridge_option1outcome_text = "This does not satisfy your thirst, so you decide
|
||||||
you must go on The Quest For Bottled Sun Drop. \n"
|
you must go on The Quest For Bottled Sun Drop. \n"
|
||||||
|
|
||||||
fridge_option2outcome_text = "The Sun Drop in a plastic bottle makes you realize
|
fridge_option2outcome_text = "The Sun Drop in a plastic bottle makes you realize
|
||||||
it would be so much tastier in a glass bottle. You decide you must go on The Quest
|
it would be so much tastier in a glass bottle. You decide you must go on The Quest
|
||||||
for Bottled Sun Drop. \n"
|
for Bottled Sun Drop. \n"
|
||||||
|
|
||||||
|
|
||||||
|
car_option2outcome_text = "The shelf is bare! There is no glass-bottled Sun Drop
|
||||||
|
to be found here."
|
||||||
|
|
||||||
|
# ENDING OUTCOMES
|
||||||
|
|
||||||
fridge_option3outcome_text = "The cops immediately bust down your door and shoot
|
fridge_option3outcome_text = "The cops immediately bust down your door and shoot
|
||||||
you for being black. \n"
|
you for being black. \n"
|
||||||
|
|
||||||
car_option1outcome_text = "Oh no! There's a one day sale on meat. You get
|
car_option1outcome_text = "Oh no! There's a one day sale on meat. You get
|
||||||
trampled by a stampede of soccer moms. \n"
|
trampled by a stampede of soccer moms. \n"
|
||||||
car_option2outcome_text = "The shelf is bare! There is no glass-bottled Sun Drop
|
|
||||||
to be found here."
|
dui_car_option1 = "The cops pull you over and smell malt liquor on your breath.
|
||||||
|
You have gotten a DUI."
|
||||||
|
|
||||||
|
intro_option1outcome_text = "You die of dehydration.\n"
|
||||||
|
|
||||||
|
|
@ -18,23 +18,28 @@ function main()
|
|||||||
print(" ----------------------------------\n")
|
print(" ----------------------------------\n")
|
||||||
print("By: Justin and Lindsay\n\n")
|
print("By: Justin and Lindsay\n\n")
|
||||||
|
|
||||||
print(intro_text)
|
print(intro_text, "\n")
|
||||||
print("Here are your options. \n")
|
print("Here are your options. \n\n")
|
||||||
print("Option 1 - Go back to sleep. \n")
|
print("Option 1 - Go back to sleep. \n")
|
||||||
print("Option 2 - Check the fridge. \n")
|
print("Option 2 - Check the fridge. \n\n")
|
||||||
choice = input("Choose an option by pressing its number: ")
|
choice = input("Choose an option by pressing its number: ")
|
||||||
|
|
||||||
if choice == "1"
|
if choice == "1"
|
||||||
print(intro_option1outcome_text)
|
print(intro_option1outcome_text)
|
||||||
game_end()
|
game_end()
|
||||||
elseif choice == "2"
|
elseif choice == "2"
|
||||||
print(intro_option2outcome_text)
|
print(intro_option2outcome_text, "\n")
|
||||||
|
|
||||||
|
elseif choice == "q"
|
||||||
|
exit()
|
||||||
end
|
end
|
||||||
|
|
||||||
print("Here are your options. \n")
|
print("Here are your options. \n")
|
||||||
print("Option 1 - Drink the 40 oz King Cobra. \n")
|
print("Option 1 - Drink the 40 oz King Cobra. \n")
|
||||||
print("Option 2 - Drink the 2 liter bottle of Sun Drop. \n")
|
print("Option 2 - Drink the 2 liter bottle of Sun Drop. \n")
|
||||||
print("Option 3 - Drink the purple drink in order to indulge your desire to have
|
print("Option 3 - Drink the purple drink in order to indulge your desire to have
|
||||||
your Dave Chappelle moment. \n")
|
your Dave Chappelle moment. \n\n")
|
||||||
|
|
||||||
choice = input("Choose an option by pressing its number: ")
|
choice = input("Choose an option by pressing its number: ")
|
||||||
|
|
||||||
if choice == "1"
|
if choice == "1"
|
||||||
@ -45,8 +50,11 @@ function main()
|
|||||||
print(fridge_option2outcome_text)
|
print(fridge_option2outcome_text)
|
||||||
leavehouse()
|
leavehouse()
|
||||||
elseif choice == "3"
|
elseif choice == "3"
|
||||||
print(fridge_option3outcome_text)
|
print(fridge_option3outcome_text, "\n")
|
||||||
game_end()
|
game_end()
|
||||||
|
|
||||||
|
elseif choice == "q"
|
||||||
|
exit()
|
||||||
end
|
end
|
||||||
|
|
||||||
print("Here are your options. \n")
|
print("Here are your options. \n")
|
||||||
@ -59,7 +67,13 @@ function main()
|
|||||||
print(car_option1outcome_text)
|
print(car_option1outcome_text)
|
||||||
game_end()
|
game_end()
|
||||||
elseif choice == "2"
|
elseif choice == "2"
|
||||||
print(car_option2outcome_text)
|
print(car_option2outcome_text)
|
||||||
|
|
||||||
|
elseif choice == "q"
|
||||||
|
exit()
|
||||||
|
|
||||||
|
else
|
||||||
|
print(wrong_key_error)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user