housekeeping and quit choices
This commit is contained in:
parent
99ddd28bc8
commit
e99390deb3
@ -1,8 +1,10 @@
|
||||
|
||||
function game_end()
|
||||
while true
|
||||
print("Your quest ends here. Or does it?\n\n")
|
||||
|
||||
choice = input("Would you like to restart your quest? Y/N: ")
|
||||
|
||||
if choice == "Y"
|
||||
main()
|
||||
elseif choice == "y"
|
||||
@ -17,25 +19,30 @@ function game_end()
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function dui()
|
||||
|
||||
print("Here are your options. \n")
|
||||
print("Option 1 - Go to your local Safeway. \n")
|
||||
print("Option 2 - Go to the closest gas station. \n")
|
||||
|
||||
choice = input("Choose an option by pressing its number: ")
|
||||
|
||||
if choice == "1"
|
||||
print("The cops pull you over and smell malt liquor on your breath.
|
||||
You have gotten a DUI. \n")
|
||||
main()
|
||||
print(dui_car_option1,"\n")
|
||||
game_end()
|
||||
|
||||
elseif choice == "2"
|
||||
print("The cops pull you over and smell malt liquor on your breath.
|
||||
You have gotten a DUI. \n")
|
||||
main()
|
||||
You have gotten a DUI. \n")
|
||||
game_end()
|
||||
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
function leavehouse()
|
||||
print("You get in your car to find glass bottled Sun Drop. \n")
|
||||
end
|
||||
|
29
lib/story.jl
29
lib/story.jl
@ -2,21 +2,42 @@ include("../lib/io-extra.jl")
|
||||
|
||||
# Stats (character names, character statistics etc)
|
||||
character_name="You"
|
||||
|
||||
wrong_key_error = "That option is invalid"
|
||||
|
||||
# Text to be included in scenes
|
||||
|
||||
# GENERAL TEXTS
|
||||
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
|
||||
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
|
||||
you must go on The Quest For Bottled Sun Drop. \n"
|
||||
|
||||
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
|
||||
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
|
||||
you for being black. \n"
|
||||
|
||||
car_option1outcome_text = "Oh no! There's a one day sale on meat. You get
|
||||
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("By: Justin and Lindsay\n\n")
|
||||
|
||||
print(intro_text)
|
||||
print("Here are your options. \n")
|
||||
print(intro_text, "\n")
|
||||
print("Here are your options. \n\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: ")
|
||||
|
||||
if choice == "1"
|
||||
print(intro_option1outcome_text)
|
||||
game_end()
|
||||
elseif choice == "2"
|
||||
print(intro_option2outcome_text)
|
||||
print(intro_option2outcome_text, "\n")
|
||||
|
||||
elseif choice == "q"
|
||||
exit()
|
||||
end
|
||||
|
||||
print("Here are your options. \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 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: ")
|
||||
|
||||
if choice == "1"
|
||||
@ -45,8 +50,11 @@ function main()
|
||||
print(fridge_option2outcome_text)
|
||||
leavehouse()
|
||||
elseif choice == "3"
|
||||
print(fridge_option3outcome_text)
|
||||
print(fridge_option3outcome_text, "\n")
|
||||
game_end()
|
||||
|
||||
elseif choice == "q"
|
||||
exit()
|
||||
end
|
||||
|
||||
print("Here are your options. \n")
|
||||
@ -59,7 +67,13 @@ function main()
|
||||
print(car_option1outcome_text)
|
||||
game_end()
|
||||
elseif choice == "2"
|
||||
print(car_option2outcome_text)
|
||||
print(car_option2outcome_text)
|
||||
|
||||
elseif choice == "q"
|
||||
exit()
|
||||
|
||||
else
|
||||
print(wrong_key_error)
|
||||
end
|
||||
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user