Exemplo n.º 1
0
 def beach_decision():
     beach_choice = input("\n>>>   ").lower()
     if beach_choice == "a":
         running_duck()
         print("\nMike escaped!")
         typewriter('''
         Mike the duck runs off along the beach on the edge of the golden sand...
         He enjoys the feeling of the sea breeze ruffling his feathers...
         The beach seems to go on for ever, but he begins to realise that it is curving slightly.
         Eventually he spots something in the distance ahead...
         It's the pirate agan!
         He must have run all the way around the island!!!
         What should he do now???
         ''')
         typewriter(style.WHITE + "\nA   " + style.CYAN + "RUN!")
         typewriter(style.WHITE + "\nB   " + style.CYAN +
                    "Talk to him and his cute parrot.")
         typewriter(style.WHITE + "\nC   " + style.CYAN +
                    "Quack quack ATTACK!")
         print("\n")
         typewriter(style.WHITE + "\nchoose - A, B, or C")
         beach_decision()
     elif beach_choice == "b":
         typewriter(
             style.CYAN +
             "\nHello pirate, I thought I was alone on this island, \ndo you know where we are or how to get off of here?"
         )
     elif beach_choice == "c":
         print(style.CYAN + "\nQUACK QUACK ATTACK" + style.WHITE)
         beach_fight()
     else:
         typewriter("Choose - A,B, or C")
         beach_decision()
Exemplo n.º 2
0
    def forest_decision():
        forest_choice = input("\n>>>   ").lower()
        if forest_choice == "a":
            print("\nYou've chosen to run away!")
            time.sleep(2)
            running_duck()
            #need to slow this bit down
            typewriter("you run further into the forest...")
            typewriter('''
            The further in to the forest you get, the more you begin to feel lost.
            The trees all start to look the same, and you've lost your sense of direction.
            Suddenly you catch a glimpse of the feather that led you here, so, scared and lost,
            you follow the feather, only to see it land right back at the feet of the Goblin that you ran away from!
            ''')
            typewriter(style.CYAN + '''
            "Back here again! What do I do??? - Do I run away again, talk to him or fight him???"
            ''')
            typewriter(
                style.WHITE + "\nA   " + style.CYAN +
                "I am going to run away, even if I do keep getting lost.")
            typewriter(style.WHITE + "\nB   " + style.CYAN +
                       "I am going to be brave and go and talk to him.")
            typewriter(style.WHITE + "\nC   " + style.CYAN +
                       "Hey Goblin!!! (Fight!! Smack!! Bang!)")
            print("\n")
            typewriter(style.WHITE + "\nChoose - A, B, or C")

            #run function that loops back to start of forest
            #need more filler dialogue here
            forest_decision()
        elif forest_choice == "b":
            typewriter(style.CYAN + '''\n   Hello Mr Goblin!''')
            #continue to goblin question
        elif forest_choice == "c":
            print("\nHey Goblin (Fight!! Smack!! Bang!)")
            forest_fight()
            #set fight enemy to goblin
            #set fight scene to forest
            #run fight function
            #fight function should lead onwards to beach scene
        else:
            typewriter("Choose - A,B, or C")
            forest_decision()
Exemplo n.º 3
0
 def space_quiz_reply():
     typewriter(style.WHITE + "\n\n  Answer A,B, or C...")
     space_answer = input("\n>>>   ")
     if space_answer.lower() == "a":
         typewriter(
             style.MAGENTA +
             '''"That is the wrong answer! how ever little duck I like you so I am going to help you get to the next level but with out any bread which i know you love so much, oh well.."
             "Get inside this pod and I will send you off to your next destination "
             ''')
         time.sleep(2)
         running_duck()
         temple_scene()
     elif space_answer.lower() == "b":
         global bread_counter
         global space_bread
         bread_counter += 1
         space_bread = True
         typewriter(style.MAGENTA + '''
         "Wow you are correct you are wiser than your young years duck!" 
         "Here is another piece of bread , and remember don't eat it all! Get inside this pod and I will send you off to your next destination "
         ''' + style.WHITE)
         print(f"You have {bread_counter} pieces of bread.")
         time.sleep(2)
         running_duck()
         temple_scene()
     elif space_answer.lower() == "c":
         typewriter(
             style.MAGENTA +
             '''"That is the wrong answer!  how ever little duck I like you so I am going to help you get to the next level but with out any bread which i know you love so much, oh well.."
         "Get inside this pod and I will send you off to your next destination "
         ''')
         time.sleep(2)
         running_duck()
         temple_scene()
     else:
         space_quiz_reply()
Exemplo n.º 4
0
def forest_fight():
    goblin_health = 10
    duck_health = 10

    possible_damage = [2, 3, 4, 5]
    damage = random.choice(possible_damage)

    current_turn = "duck"

    while goblin_health > 0 and duck_health > 0:
        if current_turn == "duck":
            go = input("\nPress A to attack the Goblin\n>>>   ")
            if go.lower() == "a":
                damage = random.choice(possible_damage)
                goblin_health = goblin_health - damage
                if goblin_health < 0:
                    goblin_health = 0
                typewriter(
                    f"\n\nYou've attacked the Goblin and managed to do {damage} points worth of damage!"
                )
                if goblin_health == 0:
                    typewriter(
                        style.GREEN +
                        "\n\n          aarrrghhh, you vicious little duck!" +
                        style.WHITE)
                else:
                    typewriter(
                        f"\nThe Goblin's health is now only {goblin_health} points."
                    )
                current_turn = "goblin"
            else:
                typewriter("Why aren't you attacking???")
                #run fight again
        elif current_turn == "goblin":
            damage = random.choice(possible_damage)
            duck_health = duck_health - damage
            if duck_health < 0:
                duck_health = 0
            typewriter(
                f"\n\nThe Goblin attacked you back and managed to do {damage} points worth of damage!"
            )
            if duck_health == 0:
                print(style.CYAN + "\n\n         Quuuaaaackkkk!!!!!!" +
                      style.WHITE)
            else:
                typewriter(
                    f"\nBe careful! You have only {duck_health} health points remaining!!!"
                )
            current_turn = "duck"

    if duck_health == 0:
        typewriter("\n\nThe Goblin has made Crispy Duck Pancakes out of you!")
        typewriter(
            style.GREEN +
            "\nI think you'd better flap off back to your pond little duck!  HAHAHA!"
            + style.WHITE)
        typewriter(style.RED + ''' 

                        You Lose
                    G A M E   O V E R
                    ''' + style.WHITE)
        sys.exit()
    elif goblin_health == 0:
        typewriter(
            "\n\nYou have defeated the Goblin! He looks completely ducked up.")
        time.sleep(2)
        typewriter("\nThe Goblin defeatedly beckons you over...")
        time.sleep(2)
        typewriter(
            style.GREEN +
            "\nYou Little duck, you have defeated me and done me great mischief.  \nHowever, I can tell that you are alone and scared in this strange forest.  \nTo ensure that you don't keep roaming this forest and ducking up all my Goblin friends,\n I'd like to direct you to a much nicer place where you'll feel like a much better duck.  \nPlease be nicer to the people you meet there than you have been to me. "
        )
        typewriter('''
        Take this piece of bread as a token of my surrender.
        You may find it useful later in your journey.
        ''')
        global bread_counter
        bread_counter += 1
        global forest_bread
        forest_bread = True
        print(style.WHITE + f"\nYou have {bread_counter} pieces of bread.")
        time.sleep(2)
        typewriter(
            style.GREEN +
            "\nNow, walk over there and step into that strange patch of light..."
            + style.WHITE)
        time.sleep(3)
        if forest_loop == True and bread_counter == 3:
            print(
                "\nYou feel a magical power within you now that you have 3 pieces of bread..."
            )
            print(
                "\nYou feel a surge of ambition and excitement,\n and the strange forest starts to blur at the edge of your vision."
            )
            print(
                "\nThe world blurs around you, and as it comes back into focus \nyou find yourself back on top of the mountain at the mystical temple..."
            )
            temple_scene()
        else:
            if beach_bread == True:
                space_scene()
            else:
                #run duck animation
                running_duck()
                #run beach scene function
                beach_scene()
Exemplo n.º 5
0
 def beach_quiz():
     beach_choice = input("\n>>>   ").lower()
     if beach_choice == "c":
         typewriter(
             style.YELLOW +
             "\nWell done duck, here is another piece of bread, and remember...\n"
         )
         global bread_counter
         global beach_bread
         bread_counter += 1
         beach_bread = True
         print(style.WHITE + "\nZAP!")
         typewriter(
             "\nMike is pulled into a portal before he can hear the pirate's advice"
         )
         print(f"\nYou have {bread_counter} pieces of bread.")
         time.sleep(2)
         if beach_loop == True and bread_counter == 3:
             print(
                 "\nYou feel a magical power within you now that you have 3 pieces of bread..."
             )
             print(
                 "\nYou feel a surge of ambition and excitement,\n and the beach starts to blur at the edge of your vision."
             )
             print(
                 "\nThe world blurs around you, and as it comes back into focus \nyou find yourself back on top of the mountain at the mystical temple..."
             )
             temple_scene()
         else:
             if space_bread == True:
                 temple_scene()
             else:
                 #run duck animation
                 running_duck()
                 #run beach scene function
                 space_scene()
     elif beach_choice == "b":
         typewriter(
             style.YELLOW +
             "\nUnlucky ducky! No treasure for you, which is a shame as...\n"
         )
         print(style.WHITE + "\nZAP!")
         typewriter(
             "\nMike is pulled into a portal before he can hear the pirates advice"
         )
         time.sleep(2)
         space_scene()
     elif beach_choice == "a":
         typewriter(
             style.YELLOW +
             "\nUnlucky ducky! No treasure for you, which is a shame as...\n"
         )
         print(style.WHITE + "\nZAP!")
         typewriter(
             "\nMike is pulled into a portal before he can hear the pirates advice"
         )
         time.sleep(2)
         space_scene()
     else:
         typewriter("Choose - A,B, or C")
         beach_quiz()
Exemplo n.º 6
0
def space_fight():
    alien_health = 10
    duck_health = 10

    possible_damage = [2, 3, 4, 5]
    damage = random.choice(possible_damage)

    current_turn = "duck"

    typewriter(
        "\nLooking around for a weapon, you find a space lazer gun nearby and pick it up to take on the alien!!!\n Get Zapping!"
    )

    while alien_health > 0 and duck_health > 0:
        if current_turn == "duck":
            go = input("\nPress A to attack the alien\n>>>   ")
            if go.lower() == "a":
                lazer_shot_left()
                damage = random.choice(possible_damage)
                alien_health = alien_health - damage
                if alien_health < 0:
                    alien_health = 0
                typewriter(
                    f"\n\nYou've attacked the alien and managed to do {damage} points worth of damage!"
                )
                if alien_health == 0:
                    print(
                        style.MAGENTA +
                        "\n\n          eeeeeeekkkkkkkkkkk!!! ghjdbhjdssdgdsab!!!!"
                        + style.WHITE)
                else:
                    typewriter(
                        f"\nThe alien's health is now only {alien_health} points."
                    )
                current_turn = "alien"
            else:
                typewriter("\nWhy aren't you attacking???")
        elif current_turn == "alien":
            lazer_shot_right()
            damage = random.choice(possible_damage)
            duck_health = duck_health - damage
            if duck_health < 0:
                duck_health = 0
            typewriter(
                f"\n\nThe alien attacked you back and managed to do {damage} points worth of damage!"
            )
            if duck_health == 0:
                print(style.CYAN + "\n\n         Quuuaaaackkkk!!!!!!" +
                      style.WHITE)
            else:
                typewriter(
                    f"\nBe careful! You have only {duck_health} health points remaining!!!"
                )
            current_turn = "duck"

    if duck_health == 0:
        typewriter("\n\nThe alien has scrambled your particles!")
        typewriter(
            style.MAGENTA +
            "\nI think you'd better transport back to your pond little duck!  HeeHeee!"
            + style.WHITE)
        typewriter(style.RED + '''  

                        You Lose
                    G A M E   O V E R
                    ''' + style.WHITE)
        sys.exit()
    elif alien_health == 0:
        typewriter("\n\nYou have defeated the alien!")
        typewriter("\nThe alien wearily beckons you over...")
        typewriter(
            style.MAGENTA +
            "\nStrange little lifeform!  You've defeated me and shown the strength of your weird little species! \n I'll be glad to see the back of you, so I will guide you towards your goal."
        )
        typewriter('''
        Take this piece of bread as a souvenir of your time on this planet.
        You may find it useful later in your journey.
        ''')
        global bread_counter
        bread_counter += 1
        global space_bread
        space_bread = True
        print(style.WHITE + f"\nYou have {bread_counter} pieces of bread.")
        typewriter(
            style.MAGENTA +
            "\nWalk over to the space pod there, you will be transported to another dimension..."
            + style.WHITE)
        time.sleep(2)
        running_duck()
        temple_scene()
Exemplo n.º 7
0
def beach_fight():
    pirate_health = 10
    duck_health = 10

    possible_damage = [2, 3, 4, 5]
    damage = random.choice(possible_damage)

    current_turn = "duck"

    while pirate_health > 0 and duck_health > 0:
        if current_turn == "duck":
            go = input("\nPress A to attack the pirate\n>>>   ")
            if go.lower() == "a":
                damage = random.choice(possible_damage)
                pirate_health = pirate_health - damage
                if pirate_health < 0:
                    pirate_health = 0
                typewriter(
                    f"\n\nYou've attacked the pirate and managed to do {damage} points worth of damage!"
                )
                if pirate_health == 0:
                    typewriter(
                        style.YELLOW +
                        "\n\n          AAARRRGGGHHHHH, shiver me timbers!" +
                        style.WHITE)
                else:
                    typewriter(
                        f"\nThe pirate's health is now only {pirate_health} points."
                    )
                current_turn = "pirate"
            else:
                print("Why aren't you attacking???")
        elif current_turn == "pirate":
            damage = random.choice(possible_damage)
            duck_health = duck_health - damage
            if duck_health < 0:
                duck_health = 0
            typewriter(
                f"\n\nThe pirate attacked you back and managed to do {damage} points worth of damage!"
            )
            if duck_health == 0:
                print(style.CYAN + "\n\n         Quuuaaaackkkk!!!!!!" +
                      style.WHITE)
            else:
                typewriter(
                    f"\nBe careful! You have only {duck_health} health points remaining!!!"
                )
            current_turn = "duck"

    if duck_health == 0:
        typewriter("\n\nThe pirate has shivered your timbers!")
        typewriter(
            style.YELLOW +
            "\nI think you'd better get quacking back to your pond little duck!  HAHAHA!"
            + style.WHITE)
        typewriter(style.RED + '''   

                        You Lose
                    G A M E   O V E R
                    ''' + style.WHITE)
        sys.exit()
    elif pirate_health == 0:
        typewriter("\n\nYou have defeated the pirate!")
        typewriter("\nThe pirate defeatedly beckons you over...")
        typewriter(
            style.YELLOW +
            "\nAAAAARRGGHHH me little duck!  You've shown me who the captain is!\nI'll be glad to see the back of you, so I will show you how to get off this island..."
        )
        typewriter('''
        As a good pirate I will give you some treasure for your bravery.
        Take this piece of bread as a token of my surrender.
        You may find it useful later in your journey.
        ''')
        global bread_counter
        bread_counter += 1
        global beach_bread
        beach_bread = True
        print(style.WHITE + f"\nYou have {bread_counter} pieces of bread.")
        typewriter(
            style.YELLOW +
            "\nWalk over there and swashbuckle yourself into that strange patch of light..."
            + style.WHITE)
        time.sleep(3)
        if beach_loop == True and bread_counter == 3:
            print(
                "\nYou feel a magical power within you now that you have 3 pieces of bread..."
            )
            print(
                "\nYou feel a surge of ambition and excitement,\n and the beach starts to blur at the edge of your vision."
            )
            print(
                "\nThe world blurs around you, and as it comes back into focus \nyou find yourself back on top of the mountain at the mystical temple..."
            )
            temple_scene()
        else:
            if space_bread == True:
                temple_scene()
            else:
                #run duck animation
                running_duck()
                #run beach scene function
                space_scene()
Exemplo n.º 8
0
 def forest_quiz_reply():
     typewriter(style.WHITE + "\n\n  Answer A,B, or C...")
     forest_answer = input("\n>>>   ")
     if forest_answer.lower() == "a":
         typewriter(
             style.GREEN +
             '''"That is the wrong answer!  If you got it right I would give you something useful, but oh well.."
         "I will still show you how to get to somewhere nicer though..."
         "Walk into that strange light over there!"
         ''')
         time.sleep(2)
         #run duck animation
         running_duck()
         #run beach scene function
         beach_scene()
     elif forest_answer.lower() == "b":
         typewriter(style.GREEN + '''
         "You are a wise duck!" 
         "Take this loaf of bread, you might need it later, so don't eat it all!"
         "Now, walk into that strange light over there, you will find yourself somewhere much nicer than here!"
         ''' + style.WHITE)
         global bread_counter
         bread_counter += 1
         global forest_bread
         forest_bread = True
         print(f"You have {bread_counter} pieces of bread.")
         time.sleep(2)
         ############## skip to temple here if forest_loop == True #############################
         if forest_loop == True and bread_counter == 3:
             print(
                 "\nYou feel a magical power within you now that you have 3 pieces of bread..."
             )
             print(
                 "\nYou feel a surge of ambition and excitement,\n and the strange forest starts to blur at the edge of your vision."
             )
             print(
                 "\nThe world blurs around you, and as it comes back into focus \nyou find yourself back on top of the mountain at the mystical temple..."
             )
             temple_scene()
         else:
             if beach_bread == True:
                 space_scene()
             else:
                 #run duck animation
                 running_duck()
                 #run beach scene function
                 beach_scene()
     elif forest_answer.lower() == "c":
         typewriter(
             style.GREEN +
             '''"That is the wrong answer!  If you got it right I would give you something useful, but oh well.."
         "I will still show you how to get to somewhere nicer though..."
         "Walk into that strange light over there!"
         ''')
         time.sleep(2)
         #run duck animation
         running_duck()
         #run beach scene function
         beach_scene()
     else:
         forest_quiz_reply()