Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Mtn_Secenario_Adventure_Game.py
# Choose your own adventure game
# WIZARD MOUNTAIN
# a text-based choose your own adventure game
# This adventure is like an upside down tree with branches
# this program is full of blocks of code, known as branches, or code branches
# Make sure to visit every branch to make sure all of the code works
def parachute_fail():
print("your parachute fails! Good luck!")
def wizard_mtn():
print("You land on the mountain, known as WIZARD MOUNTAIN")
def water():
print("You make a rough landing in the water! You put on your floaties and wait for rescue.")
def curl():
print("Good thinking! Your plane crashes. You are safe, but you are in an unknown area.")
def valley():
print("You safely land in the middle of the goat herd.")
def goat_ride():
print("The trusty goat takes you to the nearest town. You are safe!")
def goat_herder():
print("You become a successful goat herder and make millions.")
def bad_wizard():
print("The object captures you and throws you into a magical stew paired with frog legs and magic chicken wings")
def good_wizard():
print("A magical wizard comes from the object with a coconut and healing potion for you.")
def wrong():
print("try typing your answers with a capital letter choice instead")
print("You take your trusty propellar plane out for a joy ride. Suddenly, the plane's propeller stops working and you are hurtling towards the ground! You quickly spot a parachute next to you. What do you do? ")
choice = raw_input("A) Quickly put on the parachute, B) Try to steer the plane towards the nearest body of water, or C) Curl up into a ball ")
if choice == "A":
# First branch of story
print("You jump out of the plane! You pull the string to open up the parachute. To your right, you see a mansion on top of a mysterious mountain. To your left, you see a goat herd in the valley. What do you do? ")
choice = raw_input("A) Steer right or B) Steer left ")
if choice == "A":
wizard_mtn()
print("You see an object in the distance.")
choice = raw_input("A) Go to object? or B) Hike towards the mansion ")
if choice == "A":
good_wizard()
else:
bad_wizard()
elif choice == "B":
valley()
choice = raw_input("A) Ride a goat to the nearest town or B) Become a goat herder")
if choice == "A":
goat_ride()
elif choice == "B":
goat_herder()
else:
parachute_fail()
elif choice == "B":
# Second branch of the story
water()
elif choice == "C":
# Third branch of the story
curl()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.