Ejemplo n.º 1
0
def first_combat(player):
    first_combat_query = input_ss("You hear the heavy footfalls of an approaching hulking guard.\
 The only way to avoid confronting it is to go down the stairs. Do you [stay and fight] or [go down the stairs]?\n", player)

    if first_combat_query == "go down the stairs":
        print_s("Darwin would be proud.\n")
        decision_counter=0
        
    elif first_combat_query == "stay and fight":
        print(opponent.art())
        player.combat(opponent)
        decision_counter=2

    return(decision_counter)
Ejemplo n.º 2
0
def oyster_encounter(player):
    oyster_query = input_s(
        "As you enter the sewers...an interesting smell looms in the air that makes your stomach rumble. A giant oyster lies the on the side, but who knows how long it has been there? Do you [eat] the oyster or [keep moving]?\n\n",
        player)
    while str(oyster_query) not in ["eat", "keep moving"]:
        oyster_query = input_s(sample_sass(), player)

    if oyster_query == "eat":
        oyster = random.randint(-5, 5)

        player.hp += oyster

        if oyster > 0:
            print_s(
                "\nThe oyster was still good! Your hunger is sated. You gain "
                + str(oyster) + ' hp. Your total hp is ' + str(player.hp) +
                '.')
        elif oyster == 0:
            print_s(
                '\nThe oyster seemed to do very little, but at least nothing bad has happened...yet.'
            )
        else:
            print_s(
                "\nThe oyster was foul, and your stomach lurches. You lose " +
                str(abs(oyster)) + ' hp. Your total hp is ' + str(player.hp) +
                '.')

    elif oyster_query == "keep moving":
        print_s(
            "\nYou continue onward, ignoring the pang of hunger. Better not to risk it."
        )
Ejemplo n.º 3
0
def brownie_encounter(player):
    brownie_query = input_ss(
        "As you ascend the palatial stairway...an interesting smell looms in the air that makes your stomach rumble. A giant brownie lies to one side, but you have some concerning recent memories of a dodgy oyster. Do you [eat] the brownie or [keep moving]?\n",
        player)
    brownie = random.randrange(1, 5)
    if brownie_query == "eat":
        player.hp += brownie
        print_s("The brownie was still good! Your hunger is sated. You gain " +
                str(brownie) + ' hp. Your total hp is ' + str(player.hp) + ".")

    elif brownie_query == "keep moving":
        print_s(
            "You continue onward, ignoring the pang of hunger. Better not to risk it."
        )
Ejemplo n.º 4
0
def second_combat(player):

    print(opponent.art())

    d_10 = random.randint(1, 10)

    if d_10 > 3:
        print_s("Sneaky sneaky... you did it.\n")
        decision_counter = 0

    elif d_10 <= 3:
        print_s("Oh snap, you woke him up you club footed moose. \n",
                color='purple')
        player.combat(opponent)
        decision_counter = 2

    return (decision_counter)
Ejemplo n.º 5
0
def shark_game(player):
	dice = random.randint(1,10)
	input_s("As you continue in your quest for the elusive Wizard and emerge onto the balcony, you encounter an escaped 'mythical' creature from the menagerie - the famous talking LandShark.", player)
	print(shark.art())
	time.sleep(2)
	input_s("The *clever* LandShark, having been on land for so long, has grown lungs and developed consumption (in addition to liver cirrhosis, for other reasons).", player)
	decision = input_s("Do you [jump over the shark] and risk infection or [go the long way] on your quest to the wizard?\n", user = player)

	while str(decision) not in ['jump over the shark', 'go the long way', 'riddle me']:
		decision = input_s(text=sass.sample_sass(), user = player, color="purple")

	if decision == "jump over the shark":
		if dice > 3:
			input_s("Damn, you just signed up for a lifetime of pain and suffering, lose 3 HP.", player)
			player.hp -= 3
		elif dice <= 3:
			input_s("You narrowly escaped, but why were you so foolish in the first place? Dumbass.", player)
			player.intelligence -= 2
			player.hp += 2
		
	elif decision == "go the long way":
		input_s("Someone knows what they're doing! Good job!", player)
		player.intelligence += 3
		input_s("Now you have to double back to the stairs to find an alternative route and encounter the legendary, award winning Milwaukee's Best (Monster).", player)
		print_s("To get past this monster, you must fight one of his (somewhat drunken) creatures.")
		time.sleep(2)
		animal = creatures.Animals()
		input_s("A wobbly " + animal.name + " stumbles down the stairs and attacks!\n", player)
		print(animal.art())
		player.combat(animal)
		if player.hp>0:
			input_s("I hope you're proud of your self, defeating a drunken " + animal.name + ". But you get to pass on to your greatest challenge yet. \n", player)
	elif decision == "riddle me":
		print_s("Congrats! *coughs violently* You have uncovered my hidden riddle!")
		my_puzzle = puzzles.Puzzles()
		puzzle_success = my_puzzle.do_puzzle(user = player)
	
		if puzzle_success == True:
			input_s("Great work! You completed my riddle and are richly rewarded.", player)
			player.intelligence += 3
			player.attack += 2
		
		elif puzzle_success == False:
			input_s("Drats, you failed. But (cough) have a free pass anyway.", player)
Ejemplo n.º 6
0
def beer_encounter(user):
    response_list = [
        "You take a drink of sumptious sorghum whiskey, the finest you've ever tasted.",
        "You drink some more, it's been quite a day after all.",
        "You feel at one with all of humanity, but you're also losing fine motor control.",
        "You're getting a little woozy. Are you sure this is a good idea?",
        "Your vision is starting to blur and it's hard to see the cask anymore.",
        "You can't stand."
    ]
    drink_query = "yes"
    extra_drinks = 0
    while drink_query == "yes":
        print_s(response_list[extra_drinks])
        user.attack -= 1
        print_s("Your attack ability has been reduced to " + str(user.attack) +
                ".")
        if extra_drinks % 2 == 1:
            user.intelligence -= 1
            print_s("Your intelligence has been reduced to " +
                    str(user.intelligence) + ".")
        if extra_drinks > 1:
            user.hp -= 1
            print("Your health points have been reduced to " + str(user.hp) +
                  ".")
        if extra_drinks >= 5:
            print(
                "You go into a catatonic stupor. You aren't conscious for your death, but rest assured it was embarassing."
            )
            user.hp = 0
            break
        drink_query = input_s("Do you want to keep drinking?", user)
        extra_drinks += 1
        while drink_query not in ["yes", "no"]:
            drink_query = input_s(sass.sample_sass(), user, "purple")
Ejemplo n.º 7
0
def attempt_climb(user, climb_query):
    success = 0
    while user.hp > 0 and success == 0 and climb_query == "climb":
        while climb_query not in ["climb", "rope", "walk"]:
            climb_query = input_s(sample_sass(), user, "purple")
        success_rate = random.randrange(0, 10)
        if success_rate < 6:
            user.hp -= 2
            climb_query = input_s(
                "You were unsuccessful scaling the wall and your health points are reduced to "
                + str(user.hp) +
                ". Do you want to attempt the [climb] again or [walk] in the door?\n",
                user)
            while climb_query not in ["climb", "rope", "walk"]:
                climb_query = input_s(sample_sass(), user, "purple")
        else:
            success = 1
            print_s("You've successfully climbed through the window!")
    if user.hp <= 0:
        print_s("You really should have tried the door.")
    elif climb_query == "rope":
        print_s(
            "You deftly swing the rope over a gargoyle flanking the window and scamper up the wall like a white-faced capuchin."
        )
        success = 1
    elif climb_query == "walk":
        success = 2
    return (success)
Ejemplo n.º 8
0
def walk_in(player):
    opponent = creatures.Magic()
    print_s(
        "You strut confidently through the main castle door. You enter an impressively portioned entrance hall lit by sunlight streaming through the tall mullioned windows. You briefly admire the marble statues and tapestries lining the walls."
    )
    input_s(
        "You see a " + opponent.name +
        " taking a fighting stance ten meters in front of you.", player)
    print(opponent.art())
    player.combat(opponent)
    if player.hp > 0:
        player.mana += 1
        input_s(
            "Bomb diggity. You emerge victorious from your latest escapade. Defeating this magical creature increases your mana to "
            + str(player.mana) + ".\n", player)
        print_s(
            "At the end of the entrance hall is a magnificent pair of staircases sweeping up to the next level. "
        )
        stair_query = input_s("Do you go up the stairs?[yes] or [no]\n",
                              player)
        while stair_query not in ["yes", "no"]:
            stair_query = input_s(sample_sass(), player, "purple")
        if stair_query == "no":
            while (stair_query == "no"):
                passive_actions = [
                    "A breeze blows gently through the windows.",
                    "You hear the sound of birds chirping outside.",
                    "A mouse scurrying along the wall rustles gently.",
                    "You check your watch.",
                    "All remains quiet in the entrance hall.",
                    "You think about how long it must take to chisel a sculpture.",
                    "You watch an ant crawl by on the floor.",
                    "You contemplate what your life could have been if you hadn't gone to prison.",
                    "You spy a new oil painting on an eas\
el and watch it dry. "
                ]
                index = random.randrange(len(passive_actions))
                print_s(passive_actions[index])
                time.sleep(5)
                stair_query = input_s(
                    "Do you go up the staircase yet?[yes] or [no]\n", player)
                while stair_query not in ["yes", "no"]:
                    stair_query = input_s(sample_sass(), player, "purple")
        brownie_encounter(player)
        input_s(
            "At the top of the stairs you enter a luxuriously decorated hallway. The thick carpet muffles th\
e sound of your footsteps. You pass several creepy old paintings and notice a door cracked to your left.",
            player)
Ejemplo n.º 9
0
def easter_egg(player):
    shelf = '''
 _________________________________________________________
||-------------------------------------------------------||
||.--.    .-._                        .----.             ||
|||==|____| |H|___            .---.___|""""|_____.--.___ ||
|||  |====|P| |xxx|_          |+++|=-=|_  _|-=+=-|==|---|||
|||==|    |E| |   | \         |   |   |_\/_|Black|  | ^ |||
|||  |    |R| | R |\ \   .--. |   |=-=|_/\_|-=+=-|  | ^ |||
|||  |    |L| |   |_\ \_( oo )|   |   |    |Magic|  | ^ |||
|||==|====| |H|xxx|  \ \ |''| |+++|=-=|""""|-=+=-|==|---|||
||`--^----'-^-^---'   `-' ""  '---^---^----^-----^--^---^||
||-------------------------------------------------------||
||-------------------------------------------------------||
||               ___                   .-.__.-===-. .---.||
||              |===| .---.   __   .---| |XX|  P  |_|^^^|||
||            /(|   |_|III|__|''|__|:x:|=|  |  Y  |=| = |||
||           / (|===|+|   |++|  |==|   | |  |  T  | |   |||
||       /\\\/ _(|===|-|   |  |''|  |:x:|=|  |  H  | |   |||
||_____  -\{___(|   |-|   |  |  |  |   | |  |  O  | | = |||
||       _(____)|===|+|[I]|DK|''|==|:x:|=|XX|  N  |=|^^^|||
||              `---^-^---^--^--'--^---^-^--^-===-^-^---^||
||-------------------------------------------------------||
||            \033[8mChoose [read] for secret room\033[8m\033[0m              ||
||_______________________________________________________||

'''

    print_s(
        "You scan the room. It appears mostly empty apart from a dusty bookshelf that seems to contain questionably old and outdated textbooks."
    )
    time.sleep(2)
    decision = input_ss(
        'You may not have time for assing about with useless scholarly nonsense, but it may prove fruitful. Do you [leave] or stay and [search]?',
        player)

    if decision == 'search':
        print(shelf)
        input_s(
            "You begin scanning the bookshelf for something entertaining and/or educational. An ancient text, bound in thousand year old embossed centaur leather, briefly catches your eye. Its title, 'Mastery of Python and Complex Systems', reminds you of an ancient teaching you once received. The effects of amnesia are taking their toll, and the memory fades.",
            player)
        book_decision = input_ss(
            'You question your existence and past life before the prison. Before you break down into an existential crisis, you [leave] the room. Or do you?\n',
            secrets="read",
            user=player)
        if book_decision == 'read':
            input_s(
                'You impulsively decide to read the book about Pythons. Perhaps in some attempt of mastering creature control? However, pulling the book from the shelf, you realise the book is no book at all. Instead, the bookshelf swings open to reveal a secret room.\n',
                player,
                color='green')
            print_s(
                "Inside, you find ancient texts and writings in languages you barely know the name of (assembly, java, and visual basic??). You study them for some time in an attempt to gain some knowledge."
            )
            hidden_room = puzzles.Puzzles()
            room_puzzle = hidden_room.do_puzzle(user=player)

            if room_puzzle == True:
                input_s(
                    "After a few hours your hard work pays off and you gain 1 intelligence, and leave the room.",
                    player)
                player.intelligence += 1

            else:
                input_s(
                    'Unfortunately your mental capacity is restricted by inactivity from your time in the cell, and you do not solve the mysteries of the ancient texts. You leave the room.',
                    player)
Ejemplo n.º 10
0
    def do_puzzle(self, user_input=None, user=None):
        try_counter = user.intelligence
        user_input = input_s(
            'Time for a puzzle! Are you up to the task? [yes] or [no]\n\n',
            user)
        while user_input not in ['yes', 'no']:
            user_input = input_s(sample_sass() + 'Enter [yes] or [no]\n\n',
                                 user,
                                 color='purple')

        if user_input == 'yes':
            print_s(master_puzzles[self.puzzle_question]['Question:'])

            while try_counter > 0:
                user_answer = input_s('What is your answer?\n', user)

                if user_answer.lower() == master_puzzles[
                        self.puzzle_question]['Answer:']:
                    print_s('\n {} is correct! You may proceed.'.format(
                        master_puzzles[self.puzzle_question]['Answer:']),
                            color='green')
                    del master_puzzles[self.puzzle_question]
                    self.completed = True
                    return (self.completed)

                elif user_answer.lower() != master_puzzles[
                        self.puzzle_question]['Answer:']:
                    try_counter -= 1
                    print_s('{} is incorrect! You have {} more tries.'.format(
                        user_answer, try_counter),
                            color='red')

                    if try_counter > 0:
                        user_hint = input_s(
                            'Are you maybe a little bit dumb? Perhaps you drank a little too much Farmer Nick\'s Ancient Grain Sorghum Whiskey? Would you like a hint? [yes] or [no]',
                            user)

                        while user_hint not in ['yes', 'no']:
                            user_hint = input_s(sample_sass() +
                                                'Enter [yes] or [no].\n\n',
                                                user,
                                                color='purple')

                        if user_hint == 'yes':
                            print_s(
                                master_puzzles[self.puzzle_question]['Hint:'])

                    if try_counter == 0:
                        print_s('Guess what? You failed. You\'re f****d.',
                                color='red')
                        self.completed = False
                        return (self.completed)

        elif user_input == 'no':
            print_s('That was probably a mistake. Best of luck, though.',
                    color='red')
            return (self.completed)
Ejemplo n.º 11
0
            input_s(
                "As the daylight hits your face, you feel the warmth sink into your soul and your health points increase to "
                + str(player.hp) +
                ". You have a sudden flash of memory: the details are hazy, but you recall that you were imprisoned by a powerful wizard. Looking around you, you realize you are in a vaguely familiar courtyard - the courtyard of the wizard's castle! This is your chance to find the wizard and solve the mystery of your imprisonment - and take your revenge!\n",
                player)
            zookeeper_encounter(player)

            entry_query = input_s(
                "You exit the menagerie and look around the courtyard. The outer wall is unscalable and the portcullis is down. There is a window two floors up the castle wall and a main entrance. Do you attempt to [climb] the wall or [enter] the door?\n",
                player)
            while entry_query not in ["climb", "enter", "rope"]:
                entry_query = input_s(sample_sass(), player, "purple")
            if entry_query == "climb" or entry_query == "rope":
                success = attempt_climb(player, entry_query)
                if success == 0:
                    print_s("You have fallen to your death.")
                    break
                elif success == 1:
                    input_s(
                        "Light-footed as a prancercize instructor, you alight on the floor of a cozy room smelling of roses - what a relief after that sewer! You look around and see a sorceress perusing a perl manual at a nearby table.",
                        player)
                    sorc_approach = input_s(
                        "Do you approach the sorceress?[yes] or [no]\n",
                        player)
                    while sorc_approach not in ["yes", "no"]:
                        sorc_approach = input_s(sample_sass(), player,
                                                "purple")
                    if sorc_approach == "yes":
                        input_s(
                            "'Hello young traveler!' she sings.\n 'My name is Sofia. Sit with me and gain some perls of wisdom.'",
                            player)
Ejemplo n.º 12
0
    def combat(self, monster=None):
        while monster.hp > 0:
            if self.hp <= 0:
                print_s('You have died to a ' + monster.name, color='red')
                break
            elif monster.hp > 0:
                combat_query = input_s(
                    '[a]ttack, [r]isky attack, or [m]agic?\n', self)

                if combat_query == 'a':
                    new_user_attack = random.randint(1, self.attack)
                    new_mon_attack = random.randint(1, monster.attack)
                    print_s(combatResponses.combatResponse_player(
                        self.attack, new_user_attack) + ' ' + 'You deal ' +
                            str(new_user_attack) + ' damage to ' +
                            monster.name,
                            color='red')
                    time.sleep(3)
                    monster.hp -= new_user_attack
                    if monster.hp > 0:
                        print_s('The ' + monster.name + ' has ' +
                                str(monster.hp) + ' health remaining.')
                        time.sleep(3)
                        self.hp -= new_mon_attack
                        print_s(combatResponses.combatResponse_monster(
                            monster.attack, new_mon_attack) + ' ' +
                                monster.name + ' does ' + str(new_mon_attack) +
                                ' damage. Your health is now ' + str(self.hp),
                                color='red')
                        time.sleep(3)
                    else:
                        print_s('The ' + monster.name + ' is dead.')
                        break

                if combat_query == 'r':
                    chance = random.randint(1, 20)
                    min_damage = int(0.5 * self.attack)
                    max_damage = 2 * self.attack
                    new_user_attack = random.randint(min_damage, max_damage)
                    new_mon_attack = random.randint(1, monster.attack)
                    if chance > 10:
                        print_s(combatResponses.combatResponse_player(
                            self.attack, new_user_attack) + ' ' + 'You deal ' +
                                str(new_user_attack) + ' damage to ' +
                                monster.name,
                                color='red')
                        time.sleep(3)
                        monster.hp -= new_user_attack
                        if monster.hp > 0:
                            print_s('The ' + monster.name + ' has ' +
                                    str(monster.hp) + ' health remaining.')
                            time.sleep(3)
                            self.hp -= new_mon_attack
                            print_s(
                                combatResponses.combatResponse_monster(
                                    monster.attack, new_mon_attack) + ' ' +
                                monster.name + ' does ' + str(new_mon_attack) +
                                ' damage. Your health is now ' + str(self.hp),
                                color='red')
                            time.sleep(3)
                        else:
                            print_s('The ' + monster.name + ' is dead.')
                            break
                    else:
                        print_s(combatResponses.missResponse(), color='purple')
                        time.sleep(3)
                        self.hp -= new_mon_attack
                        print_s(combatResponses.combatResponse_monster(
                            monster.attack, new_mon_attack) + ' ' +
                                monster.name + ' does ' + str(new_mon_attack) +
                                ' damage. Your health is now ' + str(self.hp),
                                color='red')

                if combat_query == 'm':
                    if self.mana > 0:
                        new_user_attack = self.attack
                        new_mon_attack = random.randint(1, monster.attack)
                        print_s(combatResponses.magicResponse() +
                                str(new_user_attack) + ' damage.',
                                color='red')
                        monster.hp -= new_user_attack
                        self.mana -= 1
                        print_s('You have ' + str(self.mana) + ' mana left.')
                        if monster.hp > 0:
                            print_s('The ' + monster.name + ' has ' +
                                    str(monster.hp) + ' health remaining.')
                            time.sleep(3)
                            self.hp -= new_mon_attack
                            print_s(
                                combatResponses.combatResponse_monster(
                                    monster.attack, new_mon_attack) + ' ' +
                                monster.name + ' does ' + str(new_mon_attack) +
                                ' damage. Your health is now ' + str(self.hp),
                                color='red')
                            time.sleep(3)
                        else:
                            print_s('The ' + monster.name + ' is dead.')
                            break
                    else:
                        print_s('You have no mana left!', color='blue')
            else:
                break
Ejemplo n.º 13
0
            input_s(
                "As the daylight hits your face, you feel the warmth sink into your soul and your health points increase to "
                + str(player.hp) +
                ". You have a sudden flash of memory: the details are hazy, but you recall that you were imprisoned by a powerful wizard. Looking around you, you realize you are in a vaguely familiar courtyard - the courtyard of the wizard's castle! This is your chance to find the wizard and solve the mystery of your imprisonment - and take your revenge!\n",
                player)
            zookeeper_encounter(player)

            entry_query = input_s(
                "You exit the menagerie and look around the courtyard. The outer wall is unscalable and the portcullis is down. There is a window two floors up the castle wall and a main entrance. Do you attempt to [climb] the wall or [walk] in the door?\n",
                player)
            while entry_query not in ["climb", "walk", "rope"]:
                entry_query = input_s(sample_sass(), player, "purple")
            if entry_query == "climb" or entry_query == "rope":
                success = attempt_climb(player, entry_query)
                if success == 0:
                    print_s("You have fallen to your death.")
                    break
                elif success == 1:
                    input_s(
                        "Light-footed as a prancercize instructor, you alight on the floor of a cozy room smelling of roses - what a relief after that sewer! You look around and see a sorceress perusing a perl manual at a nearby table.",
                        player)
                    sorceress = creatures.Sorceress()
                    print(sorceress.art())
                    sorc_approach = input_s(
                        "Do you approach the sorceress?[yes] or [no]\n",
                        player)
                    while sorc_approach not in ["yes", "no"]:
                        sorc_approach = input_s(sample_sass(), player,
                                                "purple")
                    if sorc_approach == "yes":
                        input_s(
Ejemplo n.º 14
0
   ::          ::: ::::::       ::       
   :            ::: :: :::      :  

           Prisons & Pythons      
 '''                                        

game_play=1
print(art)
print("Optimal Terminal window size = 130x75")
print("INSTRUCTIONS\n Actions are in [square brackets]\n Your various attacks are:\n [a]ttack which is the basic move,\n [r]isky which can have a bigger imapct but can miss the target\n or [m]agic always does max damage but the number of uses are limited\n If there is a wait, hit <enter>\n You can call up your [status] at any time  \n")
print("CREDITS\n ")
while game_play==1:# the player enters the loop. they cannot escape the loop until game_play is called not active.
    pre_query1=input("What's your name? ")
    pre_query2=input("How hard do you want this to be? [easy], [medium], or [hard] ")
    player=user.Prisoner(name=pre_query1, difficulty=pre_query2) 
    print_s("Your name is "+ player.name+", you have "+ str(player.hp)+ " health points. \n")
    read_statement=input_s("Press enter to begin.\n", player)
    
    levelone='''
        ..               _                          ..                                         
  x .d88"               u                     x .d88"                                          
   5888R               88Nu.   u.              5888R             u.      u.    u.              
   '888R        .u    '88888.o888c      .u     '888R       ...ue888b   x@88k u@88c.      .u    
    888R     ud8888.   ^8888  8888   ud8888.    888R       888R Y888r ^"8888""8888"   ud8888.  
    888R   :888'8888.   8888  8888 :888'8888.   888R       888R I888>   8888  888R  :888'8888. 
    888R   d888 '88%"   8888  8888 d888 '88%"   888R       888R I888>   8888  888R  d888 '88%" 
    888R   8888.+"      8888  8888 8888.+"      888R       888R I888>   8888  888R  8888.+"    
    888R   8888L       .8888b.888P 8888L        888R      u8888cJ888    8888  888R  8888L      
   .888B . '8888c. .+   ^Y8888*""  '8888c. .+  .888B .     "*888*P"    "*88*" 8888" '8888c. .+ 
   ^*888%   "88888%       `Y"       "88888%    ^*888%        'Y"         ""   'Y"    "88888%   
     "%       "YP'                    "YP'       "%                                    "YP'    
Ejemplo n.º 15
0
def zookeeper_encounter(player):
	zookeeper_query=input_s("As you walk around the courtyard, you notice a menagerie of wild animals trapped in cages. A figure dressed in a ringmaster outfit hears you approach and turns around. As he faces you, you realize it's a bipedal lion! He growls at you and demands to know what you are doing in his zoo. How do you respond? [Say nothing], [run] towards the castle, [tell the truth], [lie], or make a lion [pun]\n", player)
	lion = creatures.Zookeeper()
	print(lion.art())
	while str(zookeeper_query) not in ["say nothing", "Say nothing", "run", "tell the truth", "pun", 'lie']:
		zookeeper_query=input_s(sample_sass(), player, "purple")
	if zookeeper_query=="say nothing" or zookeeper_query== "Say nothing" or zookeeper_query== "run" or zookeeper_query== "tell the truth":
		monster = creatures.Animals()
		print_s("The lion tells you that you do not belong here. He walks away and unlocks a dark cage...revealing a "+ monster.name + ".")
		print(monster.art())
		player.combat(monster)
		player.attack +=2
		input_s("After killing a " + monster.name + ", you are able to fashion a weapon from its remains. Your attack has increased to " + str(player.attack) + ".", player)
	elif zookeeper_query== "pun":
		print_s("You tell the lion that the wizard is your 'mane' man.")
		time.sleep(5)
		print_s("an awkward 'paws' happens as the lion stares at you....")
		time.sleep(5)
		chance = random.randint(1,20)
		if chance > 10:
			print_s("The lion eventually cracks, letting out a hearty chuckle and lets you pass. As you pass he gives you a potion of lion's strength. As you drink it, you feel your muscles growing.")
			player.attack +=2
			input_s("Your attack has increased to " + str(player.attack) + ".", player)
		else:
			monster = creatures.Animals()
			print_s('The lions stares angrily at you, clearly not appreciating your pun. He walks away and unlocks a dark cage revealing...a '+ monster.name + ".")
			print(monster.art())
			player.combat(monster)
			player.attack +=2
			input_s("After killing a " + monster.name + ", you are able to fashion a weapon from its remains. Your attack has increased to " + str(player.attack) + ".", player)
	elif zookeeper_query == 'lie':
		monster = creatures.Animals()
		print_s("You 'lion' to me? You do not belong here! He walks away and unlocks a dark cage...revealing a " + monster.name + ".")
		print(monster.art())
		player.combat(monster)
		player.attack +=2
		input_s("After killing a " + monster.name + ", you are able to fashion a weapon from its remains. Your attack has increased to " + str(player.attack) + ".", player)
	else:
		print_s('edit me')
Ejemplo n.º 16
0
   :            ::: :: :::      :  

           Prisons & Pythons      
 '''

game_play = 1
print(art)
print("Optimal Terminal window size = 100x75")
print(
    "INSTRUCTIONS\n Actions are in [square brackets]\n Your various attacks are:\n [a]ttack which is the basic move,\n [r]isky which can have a bigger imapct but can miss the target\n or [m]agic always does max damage but the number of uses are limited\n If there is no suggested command, hit <enter>\n You can call up your [status] at any time  \n"
)
print(
    "Mana: The amount of magic attacks you have, Intelligence: The number of tries you have per puzzle, HP: Player Health, Attack: Maximum attack value, Hints: These can be requested after an incorrect guess during puzzles\n"
)
print_s(
    "CREDITS\n Operations Manager: Meredith\n GitKeeper: Jessen\n Gopher: Adam\n Combat Advisor: Mitchell\n Sys.Architects: Drew and Jared\n Puzzle Queen: Shasta\n",
    color="bold",
    width=200)
while game_play == 1:  # the player enters the loop. they cannot escape the loop until game_play is called not active.
    pre_query1 = input("What's your name? ")
    pre_query2 = input(
        "How hard do you want this to be? [easy], [medium], or [hard] ")
    player = user.Prisoner(name=pre_query1, difficulty=pre_query2)
    print_s("Your name is " + player.name + ", you have " + str(player.hp) +
            " health points. \n")
    read_statement = input_s("Press enter to begin.\n", player)

    levelone = '''
        ..               _                          ..                                         
  x .d88"               u                     x .d88"                                          
   5888R               88Nu.   u.              5888R             u.      u.    u.              
   '888R        .u    '88888.o888c      .u     '888R       ...ue888b   x@88k u@88c.      .u    
Ejemplo n.º 17
0
def dice_game(player):

    print(art)

    d_10 = random.randint(1, 10)

    print_s("You go to pick up the dice and the clown whispers...")
    time.sleep(2)
    decision = input_s("[Blood] or [Power]?\n", player, color="red")

    while str(decision) not in ["blood", "power", "Blood", "Power"]:
        decision = input_s(sass.sample_sass(), player, color='purple')

    if decision.lower() == "blood":
        if d_10 > 4:
            print_s(
                "\nWow, all those years playing street dice in the ghetto paid off, you gain +2 health points\n"
            )
            print_s(
                "\nWell played my friend here take this [rope], I'm certain it'll come in handy\n",
                color="red")
            player.hp += 2

        elif d_10 <= 4:
            print_s(
                "\nShoot... you suck at this, the clown slaps you upside the head. You loose 1 health point\n the clown slopes off behind his trolley and leaves the way clear\n",
                color='purple')
            player.hp -= 1

    elif decision.lower() == "power":
        if d_10 > 4:
            print_s(
                "\nWow, all those years playing street dice in the ghetto paid off, you gain +2 attack \n"
            )
            print_s(
                "\nWell played my friend here take this [rope], I'm certain it'll come in handy\n",
                color="red")
            player.attack += 2

        elif d_10 <= 4:
            print_s(
                "\nShoot... you suck at this, the clown laughs in your face. You loose 1 attack point\n the clown slopes off behind his trolley and leaves the way clear\n",
                color='purple')
            player.attack -= 1
Ejemplo n.º 18
0
	def boss_battle(self, user_answer = None, user = None, completed = False):
		try_counter = user.intelligence
		print_s('\n\nYou cautiously step through the door to the highest room in the highest tower. Your stomach churns a bit from the oyster, brownie, and whiskey you may have consumed. Despite boratk\'s sewer, the jbrownie, the magic wombats, and the eleven stairs you climbed, you\'ve somehow made it to the end. You encounter a wizard named Simon, a sorceress named Sofia (who may or may not look familiar) and his band of apprentices dressed in glittering cloaks patterned with python calligraphy and twinkling perls. The wizard turns to you and asks in an English accent with a hint of San Fransciso vernacular, \'Do you wish you gain our respect and win the game?\' Realizing you have no choice, you accept the challenge!\n\n')
		print(wizard.art())
		input_s('Press [Enter] to proceed.', user)

#====================
# Final Puzzle Part I
#====================	
	
		while try_counter > 0:
			user_answer = input_s('\n' + final_puzzle['Part I']['Question'] + '\n\n', user) 
		
			if user_answer.lower() == final_puzzle['Part I']['Answer']:
				try_counter = user.intelligence
				proceed = input_s('\n{} is correct, but you are not finished yet. Press [enter] to proceed to Part II.\n'.format(final_puzzle['Part I']['Answer']), user, color = 'green')
				break

			elif user_answer.lower() != final_puzzle['Part I']['Answer']:
				try_counter -= 1
				print_s('\n{} is incorrect! You have {} more tries.'.format(user_answer, try_counter, final_puzzle['Part I']['Question']), color = 'red')

				if try_counter == 0:
					print_s('\nYOU ARE A FAILURE!', color = 'red')
					return(self.completed)

#=====================
# Final Puzzle Part II
#=====================

		print_s('You\'ve managed to make it to Part II, and you\'re that much closer to gaining Wizard Simon and Sorceress Sofia\'s respect. Good luck!')

		while try_counter > 0:			
			user_answer = input_s('\n' + final_puzzle['Part II']['Question'] + '\n\n', user)

			if user_answer.lower() == final_puzzle['Part II']['Answer']:
				try_counter = user.intelligence
				proceed = input_s('\n{} is correct! One challenge remains between you and earning the respect of the cloaked crew. Press [enter] to proceed.\n'.format(final_puzzle['Part II']['Answer']), user, color = 'green')
				break

			elif user_answer.lower() != final_puzzle['Part II']['Answer']:
				try_counter -= 1
				print_s('\n{} is incorrect! You have {} more tries.\n'.format(user_answer, try_counter), color = 'red')

				if try_counter == 0:
					print_s('\nYOU ARE A FAILURE!\n', color = 'red')
					return(self.completed)

#======================
# Final Puzzle Part III
#======================

		print_s('Tension is building as you get to the final puzzle of the game! You\'ve earned the respect of the mages, but Wizard Simon and Sorceress Sofia still require a final test! As devout perl disciples, they are reluctant to let any student pass through their course perl free!') 
			
		while try_counter > 0:			
			user_answer = input_s('\n\n' + final_puzzle['Part III']['Question'] + '\n\n', user)

			if user_answer.lower() == final_puzzle['Part III']['Answer']:
				try_counter = user.intelligence
				proceed = input_s('\n{} is correct! Against all odds, you\'ve earned the respect of the Wizard, Sorceress, and the band of mages. In your state of celebration, it suddenly occurs to you that you still do not know why you woke up in a prison. You recall your day, somewhat hazily, but remain unsure of the crimes you committed. You meekly ask the Wizard, \"Why did I end up in prison? I\'ve done nothing wrong!\". The mages begins to softly chant {} {} {}. The Wizard and Sorceress, with mysterious expressions, hand you a shimmering USB drive. As they press it into your palm, the mages step aside revealing a door partly ajar. Through the crack in the door, you see a flickering not unlike a late 2013 27-inch iMac LED screen. With a sense of thrill, you slowly walk through the door. Press [enter] to proceed.\n'.format(final_puzzle['Part III']['Answer'], user.name, user.name, user.name), user, color = 'green')
				self.completed = True
				return(self.completed)

			elif user_answer.lower() != final_puzzle['Part III']['Answer']:
				try_counter -= 1
				print_s('{} is incorrect! You have {} more tries.'.format(user_answer, try_counter), color = 'red')

				if try_counter == 0:
					print_s('\nYOU ARE A FAILURE!\n', color = 'red')
					return(self.completed)
Ejemplo n.º 19
0
    def boss_battle(self, user_answer=None, user=None, completed=False):
        print(wizard.art())
        try_counter = user.intelligence
        input_s(
            '\n\nYou walk through the door to the highest room in the highest tower. Your stomach churns a bit from the oysters and whiskey you might have consumed. Despite the drinking, the dodgy oysters, the sewer, and other distastful experiences, you\'ve somehow made it to the end. You encounter a wizard named Simon and his band of mages. Before you can win Simon\'s respect, you have one last challenge. Press [Enter] to proceed.\n\n',
            user)

        #====================
        # Final Puzzle Part I
        #====================

        while try_counter > 0:
            user_answer = input_s(
                '\n' + final_puzzle['Part I']['Question'] + '\n\n', user)

            if user_answer.lower() == final_puzzle['Part I']['Answer']:
                try_counter = user.intelligence
                proceed = input_s(
                    '\n{} is correct! You may proceed. Press [enter] to proceed.\n'
                    .format(final_puzzle['Part I']['Answer']),
                    user,
                    color='green')
                break

            elif user_answer.lower() != final_puzzle['Part I']['Answer']:
                try_counter -= 1
                print_s('\n{} is incorrect! You have {} more tries.'.format(
                    user_answer, try_counter,
                    final_puzzle['Part I']['Question']),
                        color='red')

                if try_counter == 0:
                    print_s('Guess what? You failed. You\'re f****d.',
                            color='red')
                    return (self.completed)

#=====================
# Final Puzzle Part II
#=====================

        print_s(
            'You\'ve managed to make it to Part II, and you\'re that much closer to gaining Wizard Simon and Sorceress Sofia\'s respect. But you have two more challenged ahead. Good luck!'
        )

        while try_counter > 0:
            user_answer = input_s(
                '\n' + final_puzzle['Part II']['Question'] + '\n\n', user)

            if user_answer.lower() == final_puzzle['Part II']['Answer']:
                try_counter = user.intelligence
                proceed = input_s(
                    '\n{} is correct! You may proceed. Press [enter] to proceed.\n'
                    .format(final_puzzle['Part II']['Answer']),
                    user,
                    color='green')
                break

            elif user_answer.lower() != final_puzzle['Part II']['Answer']:
                try_counter -= 1
                print_s('\n{} is incorrect! You have {} more tries.\n'.format(
                    user_answer, try_counter),
                        color='red')

                if try_counter == 0:
                    print_s('Guess what? You failed. You\'re f****d.\n',
                            color='red')
                    return (self.completed)

#======================
# Final Puzzle Part III
#======================

        print_s(
            'Tension is building as you get to the final puzzle of the game! You\'ve earned the respect of the mages, but Wizard Simon and Sorceress Sofia still require a final test! As devout perl disciples, they are reluctant to let any student pass through their course perl free!'
        )

        while try_counter > 0:
            user_answer = input_s(
                '\n\n' + final_puzzle['Part III']['Question'] + '\n\n', user)

            if user_answer.lower() == final_puzzle['Part III']['Answer']:
                try_counter = user.intelligence
                proceed = input_s(
                    '\n{} is correct! Against all odds, you\'ve earned the respect of the Wizard, Sorceress, and the band of mages. In your state of celebration, it suddenly occurs to you that you still do not know why you woke up in a prison. You recall your day, somewhat hazily, but remain unsure of the crimes you committed. You meekly ask the Wizard, \"Why did I end up in prison? I\'ve done nothing wrong!\". The mages begins to softly chant {} {} {}. The Wizard and Sorceress, with mysterious expressions, hand you a shimmering USB drive. As they press it into your palm, the mages step aside revealing a door partly ajar. Through the crack in the door, you see a flickering not unlike a late 2013 27-inch iMac LED screen. With a sense of thrill, you slowly walk through the door. Press [enter] to proceed.\n'
                    .format(final_puzzle['Part III']['Answer'], user.name,
                            user.name, user.name),
                    user,
                    color='green')
                self.completed = True
                return (self.completed)

            elif user_answer.lower() != final_puzzle['Part III']['Answer']:
                try_counter -= 1
                print_s('{} is incorrect! You have {} more tries.'.format(
                    user_answer, try_counter),
                        color='red')
                #user_answer = input_s(final_puzzle['Part III']['Question'], user)

                if try_counter == 0:
                    print_s('Guess what? You failed. You\'re f****d.',
                            color='red')
                    return (self.completed)