Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
2.0 kB
1
Indexable
Never
import random

def start_game():
    print("Welcome to the Island Explorer game!")
    print("You find yourself on a remote and mysterious island. Your goal is to explore and uncover its secrets.")

def explore_jungle():
    print("You enter the dense jungle and encounter various creatures.")
    choice = input("Do you want to continue exploring the jungle? (yes/no): ").lower()
    return choice == "yes"

def enter_temple():
    print("You discover a mysterious temple entrance.")
    choice = input("Do you want to enter the temple? (yes/no): ").lower()
    return choice == "yes"

def choose_temple_door():
    print("Inside the temple, there are two doors.")
    choice = input("Do you want to enter the left door or the right door? (left/right): ").lower()
    return choice

def confront_serpent():
    print("Inside the left door, you find a room filled with treasure, but a guardian serpent blocks your way.")
    choice = input("Do you want to try to sneak past the serpent or confront it? (sneak/confront): ").lower()
    return choice

def main():
    start_game()

    # Explore the jungle
    if explore_jungle():
        # Enter the temple
        if enter_temple():
            # Choose a temple door
            door_choice = choose_temple_door()

            # Confront the serpent
            if door_choice == "left":
                serpent_choice = confront_serpent()
                if serpent_choice == "sneak":
                    print("Congratulations! You successfully navigated the temple and gained special abilities.")
                else:
                    print("Oh no! The temple collapses, and you barely escape with your life.")
            else:
                print("You chose the right door. The journey continues.")

        else:
            print("You decide not to enter the temple and continue exploring the island.")

    else:
        print("You choose not to explore the jungle and stay on the beach.")

if __name__ == "__main__":
    main()
Leave a Comment