def forest():
    slowprint("The first thing you see as you enter the forest is a rabbit.")
    slowprint(
        "He's signaling for you to come follow him. Do you want to follow him?"
    )
    forest_cont = input('Y/N\n').upper()
    if forest_cont == 'Y':
        slowprint(
            "You follow the rabbit and he leads you to a cave. Do you wish to continue?"
        )
        forest_cave = input('Y/N\n').upper()
        if forest_cave == 'Y':
            slowprint("Good luck!")
            cave.cave()
        elif forest_cave == 'N':
            slowprint("You kill the rabbit because you don't trust him.")
            cave.cave()
    elif forest_cont == 'N':
        slowprint("Go in the opposite direction.")
        slowprint(
            "You happen to stumble upon an old abandoned house. Should you enter?"
        )
        forest_house = input('Y/N\n').upper()
        if forest_house == 'Y':
            slowprint(
                "You explore the house and come across a chest with gold coins."
            )
            slowprint(
                "You ponder if you should take the coins or leave them there. Should you take them?"
            )
            forest_coins = input('Y/N\n').upper()
            if forest_coins == 'Y':
                slowprint("You pick up the coins and place them in your bag.")
                slowprint(
                    "You continue to explore the house and in the hallway, you see two doors. Do you want to enter door A or door B?"
                )
                house_door = input('A/B\n').upper()
                if house_door == 'A':
                    slowprint(
                        "This leads you outside and you go deeper into the forest"
                    )
                    deep_forest.deepForest()
                if house_door == 'B':
                    slowprint("There is a bear in this room and he kills you.")
            elif forest_coins == 'N':
                slowprint(
                    "You leave them there and exit the house to go deeper into the forest."
                )
                deep_forest.deepForest()
        elif forest_house == 'N':
            slowprint("Continue to go deeper into the forest.")
            deep_forest.deepForest()
Esempio n. 2
0
def mainMenu1():
    save = scripts.savePull()
    var1 = save[0]
    var6 = save[5]
    scripts.screenClear()
    scripts.versionHeader()
    scripts.invDisplay()
    if var6 == 0:
        print(
            textwrap.fill(
                'You are Liam. An astronaut by trade, you took a bad turn on the Space Belt and landed on a strange planet. You awaken, laying in a field of grass. You see hills, a cave, and strange flora.',
                75))
    if var6 == 1:
        print(
            textwrap.fill(
                "You're covered in the blood of the innocent reptilian man that you killed. The sky rumbles.",
                75))
    print('\nHILL [1]')
    print('CAVE [2]')
    print('TOOL [3]')
    if var1 == 0:
        print('QUIT [4]')
    if var1 == 1:
        print('SOUND [4] <--')
    if var1 == 1:
        print('QUIT [5]')
    while True:
        try:
            choose = int(input('\nACTION >> '))
            if choose == 1:
                hill.hill()
            if choose == 2:
                cave.cave()
            if choose == 3:
                tool.tool()
            if choose == 4:
                if var1 == 0:
                    scripts.quitHandler()
                if var1 == 1:
                    ch1end.ch1End()
            if choose == 5:
                if var1 == 1:
                    scripts.quitHandler()
                if var1 == 0:
                    scripts.inpErrorHandler()
            if choose > 5 or choose < 0:
                scripts.inpErrorHandler()
                mainMenu1()
        except ValueError:
            scripts.inpErrorHandler()
            mainMenu1()
Esempio n. 3
0
def town():
    while True:
        print('You are in a town. To the north is a cave. To the south is the bank.')
        time.sleep(1)
        print('Commands: North   South')
        while True:
            choice = input().lower()
            if choice in ['north', 'south']:
                if choice == 'north':
                    cave.cave()
                elif choice == 'south':
                    if 'Key' in inventory:
                        print('You open the door with your key.')
                        inventory.remove('Key')
                    else:
                        print('The door is locked.')
                        break
            else:
                print('Unrecognized command. Try again.')
                continue
def deepForest():
    slowprint('''It is very dark here and the forest is even more dense.

    To make matters worse, you haven't had water in days.

    Would you like to proceed into the forest?
    ''')
    forest_cont = input('Y/N \n').upper()
    if forest_cont == 'Y':
        slowprint('You come to an old well. Drink out of the well?')
        drink_well = input('Y/N \n').upper()
    elif forest_cont == 'N':
        cave.cave()
    if drink_well == 'Y':
        slowprint('The water tastes... odd. You feel weak...')
        player.hp -= 25
    elif drink_well == 'N':
        slowprint('You are too good for well water. Continue walking?')
    cont_walk = input('Y/N \n').upper()
    if cont_walk == 'Y':
        slowprint('You see a dark silhouette in the distance. Go towards it?')
    elif cont_walk == 'N':
        slowprint(
            'You decide to sit in the middle of a dark forest with no water. You died... and probably deserved to.'
        )
        player.alive = False
        death(player)
    walk_toward = input('Y/N \n').upper()
    if walk_toward == 'Y':
        slowprint(
            'As you\'re walking you can feel the ground soften. Suddenly, the earth gives! You fall into a deep hole!'
        )
        the_hole.the_hole()
    elif walk_toward == "N":
        slowprint(
            'You run away from the mysterious figure and find yourself back at the cave!'
        )
        cave.cave()
Esempio n. 5
0
def siren():
    """
    Repeatable choice checker. If cannot determine, what
    should be done, returns False.
    """
    decision = def_input()
    if decision == '1' or decision == '1.':
        print "Siren attempts to suffocate you.", \
        "You're exhausted, but manage to let go of her grip.", \
        "Yet you fall to the water and let the flow take you away."
        return drown()
    elif decision == '2' or decision == '2.':
        print "It could be the love of your life,",
        print "but what the heck. Adventure, here I go!"
        return cave()
    else:
        print "Unknown choice. Try again."
        return False
Esempio n. 6
0
def swim():
    """
    Repeatable choice checker. If cannot determine, what
    should be done, returns False.
    """
    decision = def_input()
    if decision == '1' or decision == '1.':
        print "You managed to survive and got off the water."
        print "You wander carefully, but finally, you find a golden cave."
        print "Yaaaaaaaay!"
        return cave()
    elif decision == '2' or decision == '2.':
        print "Darkness covers your sight. You lose conscience..."
        for i in range(0,5):
            print '...'
            sleep(1)
        print "You lucky bastard! A fisherman caught you and brought you "\
        "home, where you can recover."
        print "You can start your adventure again!"
        return start.start()
    else:
        print "Unknown choice. Try again."
        return False    
Esempio n. 7
0
def main():

    # Wat do?
    while True:
        time.sleep(.3)
        print()
        print('**********************************')
        time.sleep(.3)
        print('* What do you want to do?        *')
        time.sleep(.3)
        print('* 1. Talk to Tavern Barkeep      *')
        time.sleep(.3)
        print('* 2. Shop                        *')
        time.sleep(.3)
        print('* 3. Explore Cave                *')
        time.sleep(.3)
        print('* 4. Use Items                   *')
        time.sleep(.3)
        print('* 5. Quit                        *')
        time.sleep(.3)
        print('**********************************')
        direction = input('> ')

        # Game info
        if direction == '1':
            time.sleep(.3)
            print(
                '\nWelcome visitor! Here you can use items, go shopping, take a rest, or go explore the abandoned cave outside of town!\n'
            )
            time.sleep(1)
            print('''Have a drink on the house!

    _.._..,_,_
   (          )
    ]~,"-.-~~[
  .=])' (;  ([
  | ]:: '    [
  .=]): .)  ([
    |:: '    |
     ~~----~~
     ''')
            time.sleep(1)

        # Go shopping
        if direction == '2':
            time.sleep(.3)
            shop(hero)

        # Go fighting
        if direction == '3':
            time.sleep(.3)
            cave(hero)

        # Use items
        if direction == '4':
            time.sleep(.3)
            use_items(hero)

        # Leave (sad face)
        if direction == '5':
            break

    pass