def forest(): clear() typing("Before we travel to THE FOREST, we need to set your levels.\n") time.sleep(1) clear() functions.textloading(3, "Rolling Dice") levelnumbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] knowledge = random.choice(levelnumbers) strength = random.choice(levelnumbers) charisma = random.choice(levelnumbers) speed = random.choice(levelnumbers) typing("Your knowledge level is " + str(knowledge) + ".\n") typing("Your strength level is " + str(strength) + ".\n") typing("Your charisma level is " + str(charisma) + ".\n") typing("Your speed level is " + str(speed) + ".\n") averageleveladd = knowledge + strength + charisma + speed averageleveldivide = averageleveladd / 4 typing("Your average level is " + str(averageleveldivide) + ".\n") typing("Please press enter to continue.\n") input("> ") clear() functions.textloading(3, "Traveling to THE FOREST") typing( "Welcome to THE FOREST! Today, your goal is to get the ELVERN FLUTE.\n" ) typing("Let's begin!\n") typing( "For this adventure, you need to choose a weapon. This will affect the game later on.\n" ) text.weapon_forest() weapon = "" while weapon not in ["1", "2", "3"]: weapon = input("> ") if weapon == "1": clear() typing("You have chosen the sword. Good choice!\n") elif weapon == "2": clear() typing("Nice! You chose the bow!\n") elif weapon == "3": clear() typing("The mace is a good choice!\n") typing( "As you walk through the forest trail, you see many trees and flowers.\n" ) typing("Then, you see a sign. Would you like to read it? (y/n)\n") sign = "" while sign not in ["y", "n"]: sign = input("> ") if sign == "y": clear() typing("You read the sign. It reads:\n\n") elif sign == "n": clear() typing( "You do not read the sign. It might have important information that will affect you later on.\n" ) typing("You continue on the road.\n")
def mines(): clear() typing("Before we travel to THE MINES, we need to set your levels.\n") time.sleep(1) clear() global speed global charisma global strength global knowledge functions.textloading(3, "Rolling Dice") levelnumbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] knowledge = random.choice(levelnumbers) strength = random.choice(levelnumbers) charisma = random.choice(levelnumbers) speed = random.choice(levelnumbers) typing("Your knowledge level is " + str(knowledge) + ".\n") typing("Your strength level is " + str(strength) + ".\n") typing("Your charisma level is " + str(charisma) + ".\n") typing("Your speed level is " + str(speed) + ".\n") averageleveladd = knowledge + strength + charisma + speed averageleveldivide = averageleveladd / 4 typing("Your average level is " + str(averageleveldivide) + ".\n") typing("Please press enter to continue.\n") input("> ") clear() functions.textloading(3, "Traveling to THE MINES") typing( "Welcome to THE MINES! Today, your goal is the get the famous TALERA RUBY.\n" ) typing("You will need to get past rock monsters and big avalanches.\n") typing("Let's begin!\n") typing( "As you walk to the entrance of the mine, you realize that your mine pass has expired. You are not allowed to go in the mines without one.\n" ) typing( "You do have the chance to convince the worker to let you in. You need a charisma level above 3 to do that.\n" ) typing( "You can also try to sneak in. If it goes wrong, you will spend the rest of your life in prison.\n" ) text.mine_entrance() entrance = "" while entrance not in ("1", "2"): entrance = input("> ") if entrance == "1": clear() if charisma >= 4: typing("You sucessfully convinced the worker to let you in.\n") mines_again() else: typing( "You were unable to convince the worker to let you in. You walk away in defeat.\n" ) game.save() text.youlost() functions.waitingroom_teleport() elif entrance == "2": clear() typing("You attempt to sneak in.\n") typing( "Right as you sneak in to the mine, a police officer sees you.\n") typing("Quick! We need to do something!\n") text.policeoptions() police_options = "" while police_options not in ["1", "2", "3", "4"]: police_options = input("> ") if police_options == "1": clear() typing("You attempt to run away.\n") if speed >= 5: typing( "Since you have a speed level of over 4, you are pretty fast. The policeman is no match for you.\n" ) mines_again() else: typing( "You have a speed level under 4. You are so slow! The policeman catches you, and you get put in jail forever.\n" ) game.save() text.youlost() functions.waitingroom_teleport() if police_options == "2": clear() typing("You attempt to negotiate.\n") typing( "You REALLY think you are going to get away with this? I THINK NOT!\n" ) game.save() text.youlost() functions.waitingroom_teleport() if police_options == "3": clear() typing("You attempt to hide.\n") if knowledge >= 4: typing( "Since you have a knowledge level of over 3, you at least know a good place to hide.\n" ) mines_again() else: typing("You have a knowledge level under 3.\n") typing( "You are pretty dumb, because you for some reason you hid behind the police officer.\n" ) game.save() text.youlost() functions.waitingroom_teleport() if police_options == "4": clear() typing("You attempt to fight.\n") if strength >= 5: typing( "Since you have a strength level over 4, you are pretty strong. That police man was no match for you.\n" ) mines_again() else: typing( "Why do you even try? You arms are like floppy noodles!\n") game.save() text.youlost() functions.waitingroom_teleport()
def temple_level(): clear() typing("Before we travel to THE TEMPLE, we need to set your levels.\n") time.sleep(1) clear() functions.textloading(3, "Rolling Dice") levelnumbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] knowledge = random.choice(levelnumbers) strength = random.choice(levelnumbers) charisma = random.choice(levelnumbers) speed = random.choice(levelnumbers) typing("Your knowledge level is " + str(knowledge) + ".\n") typing("Your strength level is " + str(strength) + ".\n") typing("Your charisma level is " + str(charisma) + ".\n") typing("Your speed level is " + str(speed) + ".\n") averageleveladd = knowledge + strength + charisma + speed averageleveldivide = averageleveladd / 4 typing("Your average level is " + str(averageleveldivide) + ".\n") typing("Please press enter to continue.\n") input("> ") clear() functions.textloading(3, "Traveling to THE TEMPLE") typing("Welcome to THE TEMPLE, long lost in the jungle.\n") typing("Today, your goal is to obtain the GOLDEN MONKEY STATUE.\n") typing( "You will have to avoid traps that can be found within the temple.\n") typing("To start, you will have to enter the temple, obviously.\n") typing( "This is your final chance to chicken out if you want. Do you want to chicken out? (y/n)\n" ) chicken_out = "" while chicken_out not in ["y", "n"]: chicken_out = input("> ") clear() if chicken_out == "y": text.youlost() game.save() functions.waitingroom_teleport() elif chicken_out == "n": typing("Good choice!\n") typing("You have entered the temple successfully.\n") time.sleep(2) clear() typing( "As you walk through the temple, you accidentally step on the wrong tile.\n" ) typing("The walls start closing in on you!\n") typing( "If you don't do anything, then the walls will close in on you. However, you see an opening above the wall that you can just barely fit in.\n" ) typing("Which option do you choose?\n") print("1) Let the walls close in on you\n2) Hide in the small opening.") wall_close = "" while wall_close not in ["1", "2"]: wall_close = input("> ") clear() if wall_close == "2": typing("You successfully jump into the opening.\n") typing( "However, you remember that you are claustrophobic. You do not like small spaces.\n" ) typing("Also, you got stuck.\n") text.youlost() game.save() functions.waitingroom_teleport() elif wall_close == "1": typing("You stand and let the walls close.\n") typing("That's when you discover a flaw in the temple's design.\n") typing("The walls don't close all the way.\n") typing("You are safe!\n") typing( "Now that you have avoided the walls, you can continue on to find your treasure.\n" ) time.sleep(1) clear() typing( "It turns out that you are bad at figuring out where to step. You stepped on the wrong tile AGAIN!\n" ) typing("This time, it's evil hamsters you have to look out for.\n") typing("There are a few things you can do:\n") print("1) Fight\n2) Run\n3) Negotiate\n4) Use your brainy powers.") evil_hamsters = "" while evil_hamsters not in ["1", "2", "3", "4"]: evil_hamsters = input("> ") clear() if evil_hamsters == "1": typing("You attempt to fight the hamsters.\n") if strength >= 3: typing("You are strong enough to defeat the hamsters.\n") else: typing( "Apparently, you are too weak to defeat those evil yet adorable hamsters.\n" ) typing("How embarrassing!\n") text.youlost() game.save() functions.waitingroom_teleport() elif evil_hamsters == "2": typing("You attempt to run from the hamsters.\n") some_random_numbers = ["1", "2"] a_random_number = random.choice(some_random_numbers) if a_random_number == "1": typing( "Unfortunately, some doors close, leaving you in a small room with the hamsters.\n" ) text.youlost() game.save() functions.waitingroom_teleport() elif a_random_number == "2": if speed >= 3: typing("You outrun the hamsters!\n") else: typing("The hamsters are too fast for you.\n") text.youlost() game.save() functions.waitingroom_teleport() elif evil_hamsters == "3": typing("You attempt to negotiate with the hamsters.\n") typing( "Since they are hamsters, they don't understand English, Español, Français, or even 中文!\n" ) text.youlost() game.save() functions.waitingroom_teleport() elif evil_hamsters == "4": typing("You attempt to use your knowledge to come up with a plan.\n") if knowledge >= 3: typing( "You look around and notice some hamster food on a nearby shelf.\n" ) typing( "Knowing that animals do anything for food, you chase them over to the hamster food.\n" ) typing("It's the perfect distraction.\n") else: typing( "Since you have a knowledge level of %s, you are not the smartest and try to pick up the hamsters so they won't run at you.\n" % knowledge) text.youlost() game.save() functions.waitingroom_teleport() typing("Now, you can continue on your journey through the temple.\n") time.sleep(2) clear() typing( "The floor must not like you, because you step in some quicksand.\n") typing( "If you're not careful, then you will get stuck inside it...forever!\n" ) typing("You must make a decision quick!\n") print( "Here are your options:\n1) Wiggle out\n2) Grab something and use it to pull yourself out\n3) Call for help" ) quicksand = "" # x = 1 while quicksand not in ["1", "2", "3"]: quicksand = input("> ") # x += 1 # time.sleep(1) # if x > 9: # clear() # typing("Unfortunately, you ran out of time to make a decision.\n") # text.youlost() # functions.waitingroom_teleport() clear() if quicksand == "1": typing("You try to wiggle yourself out.\n") if strength > 7: typing( "You are very strong, so you are able to wiggle yourself out.\n" ) else: typing("You are no match for the quicksand.\n") text.youlost() game.save() functions.waitingroom_teleport() elif quicksand == "2": typing("You look around for something to grab.\n") typing("You find a nearby rope that you can reach.\n") typing("You successfully pull yourself out of the quicksand.\n") elif quicksand == "3": typing("You call for help.\n") typing( "Why would there be someone in the temple who would help you out?\n" ) if knowledge > 5: typing( "With a knowledge level of %s, I'd expect you to know better.\n" % knowledge) text.youlost() game.save() functions.waitingroom_teleport() typing("Now you can keep searching for the GOLDEN MONKEY STATUE.\n") time.sleep(1) clear() typing("You walk into a room that is pitch black.\n") typing("You feel around for a light switch.\n") typing( "Once you find one, you flip it and find the GOLDEN MONKEY STATUE sitting on a pedestal in the middle of the room.\n" ) typing("You walk over and pick it up.\n") typing("Then, the temple starts collapsing!\n") typing("You run with the statue outside the room.\n") typing("The area that was once quicksand is now LAVA!\n") typing("You have to come up with an idea to get across.\n") typing( "You remember that the rope you used earlier to pull yourself out of the quicksand is still there.\n" ) typing("You can use it to swing across the lava pool.\n") typing( "However, you also find rocks in the lava that are big enough for you to jump on and make a path.\n" ) typing("This is a risky option, though. The rope swinging seems safer.\n") typing("Which option do you choose?\n") print("1) Swing with the rope\n2) Jump across using the rocks.") lava_lake = "" while lava_lake not in ["1", "2"]: lava_lake = input("> ") clear() if lava_lake == "1": typing( "You set down the statue to toss the rope onto a hook on the celing.\n" ) typing("Then, you swing across!\n") typing( "Once you make it across, you look behind you to see the floor on the other side starting to flood and burn, along with the GOLDEN MONKEY STATUE you accidentally left behind.\n" ) text.youlost() game.save() functions.waitingroom_teleport() elif lava_lake == "2": typing( "You hold the statue tight in your arms as you barely land on the first rock.\n" ) typing( "After several minutes, you make it to the other side, with the GOLDEN MONKEY STATUE safe and sound.\n" ) typing("Then, lava starts rushing after you.\n") typing( "Even if you have a knowledge level of 1, you know there is only one thing to do:\n" ) typing("RUN.\n") time.sleep(2) clear() functions.textloading(3, "RUNNING FROM LAVA") clear() typing("You successfully made it out of the temple.\n") typing("Behind you, you see the temple completely collapse.\n") typing("Bye bye, temple!\n") text.youwon() if "GOLDEN MONKEY STATUE" not in game.data.trophies: game.data.trophies.append("GOLDEN MONKEY STATUE") typing( "You have successfully obtained the GOLDEN MONKEY STATUE, earning you 25 coins.\n" ) game.data.coins += 25 else: typing( "It looks as though you have already obtained the GOLDEN MONKEY STATUE. Well, I guess I'll still give you 8 coins.\n" ) game.data.coins += 8 game.save() functions.waitingroom_teleport()
def mountains(): clear() typing("Before we travel to THE MOUNTAINS, we need to set your levels.\n") time.sleep(1) clear() functions.textloading(3, "Rolling Dice") levelnumbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] knowledge = random.choice(levelnumbers) strength = random.choice(levelnumbers) charisma = random.choice(levelnumbers) speed = random.choice(levelnumbers) typing("Your knowledge level is " + str(knowledge) + ".\n") typing("Your strength level is " + str(strength) + ".\n") typing("Your charisma level is " + str(charisma) + ".\n") typing("Your speed level is " + str(speed) + ".\n") averageleveladd = knowledge + strength + charisma + speed averageleveldivide = averageleveladd / 4 typing("Your average level is " + str(averageleveldivide) + ".\n") typing("Please press enter to continue.\n") input("> ") clear() functions.textloading(3, "Traveling to THE MOUNTAINS") typing( "Welcome to THE MOUNTAINS! Today, your goal is to obtain the DWARVEN CLUB.\n" ) typing("Let's begin!\n") typing("Up ahead, you see a mountain range with many mountains.\n") typing("You must decide which mountain the dwarves live in.\n") time.sleep(1) clear() functions.textloading(3, "CHOOSING MOUNTAIN") typing( "After hours of thinking about where dwarves may live, you narrow your options down to three choices.\n" ) text.mountain_range_mountains() typing("Which mountain do you choose?\n") chosen_mountain = "" while chosen_mountain not in ["1", "2", "3"]: chosen_mountain = input("> ") if chosen_mountain == "3": if knowledge > 4: typing("With a knowledge level of " + str(knowledge) + ", I'd expect you to know better.\n") game.save() else: typing("That is not the correct mountain.\n") game.save() text.youlost() functions.waitingroom_teleport() elif chosen_mountain == "1": return int(chosen_mountain) if speed < 5 and strength < 5: typing( "You try to climb up Talera Mountain, but according to your skill levels, you are too weak and slow to climb it before the dwarves run away with the club.\n" ) game.save() text.youlost() functions.waitingroom_teleport() else: typing("You hike towards Talera Mountain.\n") time.sleep(1) clear() typing( "You made it to Talera Mountain. You need to climb to the top to reach the dwarves.\n" ) typing("As you climb the mountain, you run into a disco yeti.\n") typing("It tries to attack you.\n") print("What do you do? Here are your options:") print("1) Use your knowledge to formulate a plan.") print("2) Fight") print("3) Run") print("4) Negotiate") yeti_choice = "" while yeti_choice not in ["1", "2", "3", "4"]: yeti_choice = input("> ") if yeti_choice == "1": if knowledge >= 5: typing( "Since you have a knowledge level of " + str(knowledge) + ", you decide the best thing to do is to put on some disco music to distract the yeti.\n" ) else: typing( "With a knowledge level of " + str(knowledge) + ", you are pretty dumb. For some reason, you try to get away by running into the yeti's cave.\n" ) typing("That was a mistake.\n") game.save() text.youlost() functions.waitingroom_teleport() elif yeti_choice == "2": if strength >= 6: typing("You are strong, so you knock the yeti out.\n") else: typing( "Your levels say that you are weak. You know what happens.\n" ) game.save() text.youlost() functions.waitingroom_teleport() elif yeti_choice == "3": if speed >= 5: typing( "According to your levels, you are fast. You outrun the yeti.\n" ) else: typing("You are too slow.\n") game.save() text.youlost() functions.waitingroom_teleport() elif yeti_choice == "4": if charisma >= 4: typing("You talk to the yeti.\n") typing("He allows you to pass.\n") else: typing( "You have a low charisma level, so he does not allow you to pass.\n" ) game.save() text.youlost() functions.waitingroom_teleport() elif chosen_mountain == "2": if knowledge < 4: typing( "You try to climb the widest mountain in the mountain range, but since you have a knowledge level of " + str(knowledge) + ", you get lost.\n") text.youlost() functions.waitingroom_teleport() else: typing("You hike towards Mount Goat.\n") time.sleep(1) clear() typing("You made it to Mount Goat. Time to climb!\n") typing( "You found a large area. It is a good place to take a break.\n" ) typing("As you sit down, a goat walks up to you.\n") typing( "Goat - I AM KING GOAT! I COMMAND YOU TO GET OFF MY PROPERTY!\n" ) text.goat_king() goat_king = "" while goat_king not in ["1", "2", "3", "4", "5"]: goat_king = input("> ") if goat_king == "1": typing("You attempt to negotiate with the goat.\n") if charisma > 6: typing( "You tell the goat that you are trying to get the DWARVEN CLUB.\n" ) typing("Goat - Ah, yes... \n") typing( "Goat - I have heard rumors that something has happened to it. You may want to go check it out.\n" ) typing("The KING GOAT allows you to pass.\n") else: typing("Goat - Nice try.\n") game.save() text.youlost() functions.waitingroom_teleport() elif goat_king == "2": typing("You attempt to fight the goat.\n") if strength > 5: typing("You are strong enough to beat the goat.\n") else: typing("With the goat's horns, it charges at you.\n") typing("You have been beat by a goat.\n") game.save() text.youlost() functions.waitingroom_teleport() elif goat_king == "3": typing("You attempt to give a peace offering to the goat.\n") if knowledge > 4: typing( "Goat - I will allow you to pass through my territory, as long as you do not harm any of us goats.\n" ) else: typing("The goat denies.\n") game.save() text.youlost() functions.waitingroom_teleport() elif goat_king == "4": typing("You attempt to run from the goat.\n") if speed > 5: typing( "You successfully outrun the goat. He is no match for you!\n" ) else: typing( "This goat is faster than you. With a speed level of " + str(speed) + ", never try to outrun a goat.") game.save() text.youlost() functions.waitingroom_teleport() elif goat_king == "5": typing("You ignore the goat.\n") typing("That was a mistake.\n") game.save() text.youlost() functions.waitingroom_teleport() typing( "Now that you have successfully got past your obstacle, you can continue on to the top of the mountain.\n" ) time.sleep(2) clear() typing( "You are almost at the top of the mountain, but there is a fork. One path leads to the tip-top of the mountain, while the other leads to a cave. Where would you like to go?\n" ) print("1) The tip-top of the mountain\n2) The cave") split_in_road = "" while split_in_road not in ["1", "2"]: split_in_road = input("> ") clear() if split_in_road == "1": typing("You continue on to the tip-top of the mountain.\n") time.sleep(1) typing( "You reach the tip-top of the mountain, but you realize that it is too tiny to hold a group of dwarves.\n" ) game.save() text.youlost() functions.waitingroom_teleport() elif split_in_road == "2": typing("You walk into the cave.\n") time.sleep(1) typing( "It is dark, so you rub some sticks together to light a fire.\n") time.sleep(1) clear() functions.textloading(2, "LIGHTING FIRE") typing( "You successfully light a fire to guide you through the cave.\n") typing("You walk around the cave, but don't see anything.\n") time.sleep(1) clear() typing("After about a half-hour, you hear voices.\n") typing("Voice 1 - Ah, yes. A very fantastic club this is!\n") typing("Voice 2 - I can't believe it's ours now!\n") typing( "The second voice confuses you. Didn't the dwarves already own a club?\n" ) typing( "You walk over towards the voices to find some robbers holding the DWARVEN CLUB.\n" ) time.sleep(1) clear() typing("The robbers see you.\n") typing( "Robber 1 - Hey, Gerald. We've got ourselves our first test subject.\n" ) typing("Gerald - I've got the club. Shall I knock him, Rob?\n") typing("Rob - Yeah!\n") typing("The robbers knock you out.\n") time.sleep(1) clear() typing( "When you wake up, you find yourself in a small, rundown shack with Rob and Gerald looking down at you.\n" ) typing( "Gerald - Wow! This club actually has powers! It knocked him out with the lightest touch.\n" ) typing("\"Oh no,\" you say to yourself.\n") typing("You were wondering why this club was so important.\n") time.sleep(1) clear() typing( "All of a sudden, Gerald puts the club down and walks over to you.\n" ) typing("It appears that he wants to tie you up in a chair.\n") typing("You also notice some potions on a shelf next to you.\n") typing( "You realize that you can escape the shack using one of these things.\n" ) typing("Which would you like to use?\n") print( "1) Grab the club and escape with it\n2) Pick up a random potion and see what it does" ) shack_escape = "" while shack_escape not in ["1", "2"]: shack_escape = input("> ") clear() if shack_escape == "1": typing( "You grab the DWARVEN CLUB, smash (or because the club is magic, lightly touch) the wall and run outside.\n" ) typing("Rob and Gerald hop on horses and chase after you.\n") typing("They chase you until you get cornered.\n") typing("Rob - It's over now.\n") time.sleep(1) clear() typing( "When all seems lost, some police officers on horses ride up and arrest Rob and Gerald for not only chasing you and stealing the club, but also because they tried to steal the TALERA RUBY and the ELVERN FLUTE.\n" ) typing( "Police Officer - It seems as though these guys were trying to steal your club.\n" ) typing("You - Uhh, yes. This was one-hundred percent my club...\n") typing( "Police Officer - Anyway, we should probably get these robbers to jail.\n" ) typing("The police officers ride away with Rob and Gerald.\n") typing("You are excited to obtain the DWARVEN CLUB.\n") text.youwon() if "DWARVEN CLUB" not in game.data.trophies: game.data.trophies.append("DWARVEN CLUB") typing( "Now that the DWARVEN CLUB is yours, you obtain 20 coins.\n" ) game.data.coins += 20 game.save() else: typing( "Hmm. It looks like you already have the DWARVEN CLUB in your trophy room.\n" ) typing("You have still earned 10 coins.\n") game.data.coins += 10 game.save() if "NON-MAGIC DWARVEN CLUB" not in game.data.trophies: typing( "You can still get the DWARVEN CLUB without its magic powers.\n" ) game.save() functions.waitingroom_teleport() elif shack_escape == "2": typing( "You pick up a random potion and throw it towards Rob and Gerald.\n" ) list_of_numbers = ["1", "2", "3"] randomnumber = random.choice(list_of_numbers) if randomnumber == "1": typing( "Unfortunately, the potion you threw was an invincibility potion.\n" ) text.youlost() game.save() functions.waitingroom_teleport() elif randomnumber == "2": typing( "The potion seems to have made a cloud of smoke between you and the robbers.\n" ) typing( "You still see the DWARVEN CLUB, so you grab it and turn around, only to find the potion shelf.\n" ) typing("The door is on the other side of the smoke.\n") typing( "You smash the club through the shelf and through the wall to successfully break out of the shack.\n" ) typing( "However, when you smashed through the potion shelf, you smashed a potion that made the DWARVEN CLUB lose its magic.\n" ) typing( "Though this is true, you have successfully escaped the robbers!\n" ) text.youwon() if "NON-MAGIC DWARVEN CLUB" not in game.data.trophies: game.data.trophies.append("NON-MAGIC DWARVEN CLUB") typing("You have also earned 10 coins.\n") game.data.coins = game.data.coins + 10 game.save() else: typing( "It seems as though the NON-MAGIC DWARVEN CLUB is already in your trophy room.\n" ) typing("You have still earned 5 coins.") game.data.coins = game.data.coins + 5 game.save() if "DWARVEN CLUB" in game.data.trophies: typing( "You may have won, but you can still get the DWARVEN CLUB with its magic powers.\n" ) game.save() functions.waitingroom_teleport() elif randomnumber == "3": typing("The potion you threw was just a glass of water.\n") typing("It didn't do much.\n") text.youlost() game.save() functions.waitingroom_teleport()
def mines_again(): typing( "As you walk through the mine, you see green gems, yellow gems, blue gems, but no TALERA RUBY.\n" ) typing("Then, you see a giant glimmering ruby sitting in a glass cage.\n") text.rubysteal() glass = "" while glass not in ["1", "2", "3"]: glass = input("> ") if glass == "1": clear() typing("You attempt to break the glass with a stone.\n") typing( "BEEP BEEP BEEP! An alarm sounds and a rock monster comes out of the cave.\n" ) text.rockmonster() rockmonster = "" while rockmonster not in ["1", "2"]: rockmonster = input("> ") if rockmonster == "1": clear() typing("You attempt to fight the rock monster.\n") if strength >= 7: typing( "WOW! You have a strength level of over 6! You successfully defeated the rock monster!\n" ) typing("You obtain the TALERA RUBY!\n") typing( "As you run for the exit of the mine, an AVALANCHE starts!\n" ) text.avalanche() avalanche = "" while avalanche not in ["1", "2", "3"]: avalanche = input("> ") if avalanche == "1": clear() typing("You attempt to run.\n") if speed == 10: typing( "WHAT??? You have a speed level of 10! You successfully made it out of the cave.\n" ) if "Talera Ruby" not in game.data.trophies: game.data.trophies.append("Talera Ruby") typing("You obtained the TALERA RUBY!\n") typing("You have also earned 20 coins!\n") game.data.coins = game.data.coins + 20 game.save() text.youwon() if "Shattered Ruby Pieces" not in game.data.trophies: typing( "You may have won, but you can also get the shattered ruby pieces.\n" ) functions.waitingroom_teleport() else: typing( "Seems like you already have the TALERA RUBY inside your trophy room...\n" ) typing("You still have earned 10 coins!\n") game.data.coins = game.data.coins + 10 game.save() text.youwon() functions.waitingroom_teleport() else: typing("The avalanche was too fast...\n") game.save() text.youlost() functions.waitingroom_teleport() elif avalanche == "2": clear() typing("You attempt to find a safe place to hide.\n") typing("You find a big rock to hide under.\n") typing("The avalanche ends.\n") if "Talera Ruby" not in game.data.trophies: game.data.trophies.append("Talera Ruby") typing("You obtained the TALERA RUBY!\n") typing("You have also earned 20 coins!\n") game.data.coins = game.data.coins + 20 game.save() text.youwon() if "Shattered Ruby Pieces" not in game.data.trophies: typing( "You may have won, but you can also get the shattered ruby pieces.\n" ) functions.waitingroom_teleport() else: typing( "Seems like you already have the TALERA RUBY inside your trophy room...\n" ) typing("You still have earned 10 coins!\n") game.data.coins = game.data.coins + 10 game.save() functions.waitingroom_teleport() elif avalanche == "3": clear() typing("You attempt to shield yourself with the ruby.\n") typing( "As the rocks fall on the ruby, it shatters to pieces.\n" ) typing("Still, you have made it out of the mines.\n") if "Shattered Ruby Pieces" not in game.data.trophies: game.data.trophies.append("Shattered Ruby Pieces") typing("You obtained the SHATTERED RUBY PIECES!\n") typing("You have also earned 15 coins!\n") game.data.coins = game.data.coins + 15 game.save() text.youwon() if "Talera Ruby" not in game.data.trophies: typing( "You may have won, but you can still get the full ruby.\n" ) functions.waitingroom_teleport() else: typing( "Seems like you already have the SHATTERED RUBY PIECES inside your trophy room...\n" ) typing("You still have earned 8 coins!\n") game.data.coins = game.data.coins + 8 game.save() functions.waitingroom_teleport() elif rockmonster == "2": clear() typing( "You ran away from the monster, but you forgot one key item...\n" ) typing("THE RUBY.\n") game.save() text.youlost() functions.waitingroom_teleport() elif glass == "2": clear() typing("You attempt to slowly lift up the glass.\n") typing("You obtain the TALERA RUBY!\n") typing("As you run for the exit of the mine, an AVALANCHE starts!\n") text.avalanche() avalanche = "" while avalanche not in ["1", "2", "3"]: avalanche = input("> ") if avalanche == "1": clear() typing("You attempt to run.\n") if speed == 10: typing( "WHAT??? You have a speed level of 10! You successfully made it out of the cave.\n" ) if "Talera Ruby" not in game.data.trophies: game.data.trophies.append("Talera Ruby") typing("You obtained the TALERA RUBY!\n") typing("You have also earned 20 coins!\n") game.data.coins = game.data.coins + 20 game.save() text.youwon() typing( "You may have won, but you can also get the shattered ruby pieces.\n" ) functions.waitingroom_teleport() else: typing( "Seems like you already have the TALERA RUBY inside your trophy room...\n" ) typing("You still have earned 10 coins!\n") game.data.coins = game.data.coins + 10 game.save() text.youwon() functions.waitingroom_teleport() else: typing("The avalanche was too fast...\n") game.save() text.youlost() functions.waitingroom_teleport() elif avalanche == "2": clear() typing("You attempt to find a safe place to hide.\n") typing("You find a big rock to hide under.\n") typing("The avalanche ends.\n") if "Talera Ruby" not in game.data.trophies: game.data.trophies.append("Talera Ruby") typing("You obtained the TALERA RUBY!\n") typing("You have also earned 20 coins!\n") game.data.coins = game.data.coins + 20 game.save() text.youwon() if "Shattered Ruby Pieces" not in game.data.trophies: typing( "You may have won, but you can also get the shattered ruby pieces.\n" ) functions.waitingroom_teleport() else: typing( "Seems like you already have the TALERA RUBY inside your trophy room...\n" ) typing("You still have earned 10 coins!\n") game.data.coins = game.data.coins + 10 game.save() functions.waitingroom_teleport() elif avalanche == "3": clear() typing("You attempt to shield yourself with the ruby.\n") typing("As the rocks fall on the ruby, it shatters to pieces.\n") typing("Still, you have made it out of the mines.\n") if "Shattered Ruby Pieces" not in game.data.trophies: game.data.trophies.append("Shattered Ruby Pieces") typing("You obtained the SHATTERED RUBY PIECES!\n") typing("You have also earned 15 coins!\n") game.data.coins = game.data.coins + 15 text.youwon() if "Talera Ruby" not in game.data.trophies: typing( "You may have won, but you can still get the full ruby.\n" ) game.save() functions.waitingroom_teleport() else: typing( "Seems like you already have the SHATTERED RUBY PIECES inside your trophy room...\n" ) typing("You have still earned 8 coins!\n") game.data.coins = game.data.coins + 8 game.save() functions.waitingroom_teleport() elif glass == "3": clear() typing("You admire the ruby.\n") time.sleep(1) functions.textloading(3, "Admiring the TALERA RUBY") typing("How is this going to help?\n") text.youlost() game.save() functions.waitingroom_teleport()
def cityhub(): while True: clear() print("Welcome to THE CITY!") print("You have " + str(game.data.coins) + " coins.") print("1) Olga's Coffee House") print("2) Aaron's Apparel") print("3) The Docks") print("4) Trophy Room") print("5) Inventory") print("6) Exit") city_options = "" while city_options not in ["1", "2", "3", "4", "5", "6"]: city_options = input("> ") if city_options == "1": clear() print("Welcome to Olga's Coffee House!") print("You have " + str(game.data.coins) + " coins.") print("1) Gas Station Coffee - 5 coins") print("2) Normal Black Coffee - 8 coins") print("3) Cappuccino - 11 coins") print("4) Latte - 13 coins") print("5) Elvern Berry Cold Brew Tea - 16 coins") print("6) Exit Shop") coffee = "" while coffee not in ["1", "2", "3", "4", "5", "6"]: coffee = input("> ") if coffee == "1": gas_station_coffee_price = 5 if game.data.coins < gas_station_coffee_price: clear() typing("You do not have enough coins to buy this.\n") short = str(gas_station_coffee_price - game.data.coins) typing("You are " + short + " coins short.") time.sleep(2) else: clear() game.data.coins = game.data.coins - gas_station_coffee_price typing("You now have " + str(game.data.coins) + " coins.\n") game.save() typing("You drink your gas station coffee. The taste leaves you dissatisfied.\n") typing("Please press enter to continue.\n") input("> ") elif coffee == "2": black_coffee_price = 8 if game.data.coins < black_coffee_price: clear() typing("You do not have enough coins to buy this.\n") short = str(black_coffee_price - game.data.coins) typing("You are " + short + " coins short.") time.sleep(2) else: clear() game.data.coins = game.data.coins - black_coffee_price typing("You now have " + str(game.data.coins) + " coins.\n") game.save() typing("You drink your black coffee. Nothing special, just makes you feel warm inside.\n") typing("Please press enter to continue.\n") input("> ") elif coffee == "3": cappuccino_price = 11 if game.data.coins < cappuccino_price: clear() typing("You do not have enough coins to buy this.\n") short = str(cappuccino_price - game.data.coins) typing("You are " + short + " coins short.") time.sleep(2) else: clear() game.data.coins = game.data.coins - cappuccino_price typing("You now have " + str(game.data.coins) + " coins.\n") game.save() typing("You drink your cappuccino. It tastes very good!\n") typing("Please press enter to continue.\n") input("> ") elif coffee == "4": latte_price = 13 if game.data.coins < latte_price: clear() typing("You do not have enough coins to buy this.\n") short = str(latte_price - game.data.coins) typing("You are " + short + " coins short.") time.sleep(2) else: clear() game.data.coins = game.data.coins - latte_price typing("You now have " + str(game.data.coins) + " coins.\n") game.save() typing("You drink your latte. The combonation of milk and coffee is sensational!\n") typing("Please press enter to continue.\n") input("> ") elif coffee == "5": elvern_berry_tea_price = 16 if game.data.coins < elvern_berry_tea_price: clear() typing("You do not have enough coins to buy this.\n") short = str(elvern_berry_tea_price - game.data.coins) typing("You are " + short + " coins short.") time.sleep(2) else: clear() game.data.coins = game.data.coins - elvern_berry_tea_price typing("You now have " + str(game.data.coins) + " coins.\n") game.save() typing("You drink your elvern berry cold brew tea. The sweetness along with some tartness just makes your day!\n") typing("Please press enter to continue.\n") input("> ") elif coffee == "6": clear() typing("You have exited the shop.\n") elif city_options == "2": clear() print("Welcome to Aaron's Apparel!") print("You have " + str(game.data.coins) + " coins.") print("What would you like to buy?") print("1) Hat") print("2) Shirt") print("3) Pants") print("4) Shoes") print("5) Outerwear") print("6) Items") print("7) Exit") apparel = "" while apparel not in ["1", "2", "3", "4", "5", "6", "7"]: apparel = input("> ") if apparel == "1": clear() print("HATS") print("1) Fedora - 15 coins") print("2) Baseball Cap - 10 coins") print("3) I❤LT Hat - 5 coins") print("4) Bike Helmet - 20 coins") hats = "" while hats not in ["1", "2", "3"]: hats = input("> ") if hats == "1": fedora_price = 15 if game.data.coins < fedora_price: clear() typing("You do not have enough coins to buy this.\n") short = str(fedora_price - game.data.coins) typing("You are " + short + " coins short.") time.sleep(2) else: clear() game.data.coins = game.data.coins - fedora_price game.data.hat = "Fedora" typing("You now have " + str(game.data.coins) + " coins.\n") game.save() typing("I think this fedora looks nice on you! You look like a secret agent...\n") typing("Please press enter to continue.\n") input("> ") if hats == "2": baseball_cap_price = 10 if game.data.coins < baseball_cap_price: clear() typing("You do not have enough coins to buy this.\n") short = str(baseball_cap_price - game.data.coins) typing("You are " + short + " coins short.") time.sleep(2) else: clear() game.data.coins = game.data.coins - baseball_cap_price game.data.hat = "Baseball Cap" typing("You now have " + str(game.data.coins) + " coins.\n") game.save() typing("I think this baseball cap looks nice on you!\n") typing("Please press enter to continue.\n") input("> ") if hats == "3": talera_hat_price = 5 if game.data.coins < talera_hat_price: clear() typing("You do not have enough coins to buy this.\n") short = str(talera_hat_price - game.data.coins) typing("You are " + short + " coins short.") time.sleep(2) else: clear() game.data.coins = game.data.coins - talera_hat_price game.data.hat = "I❤LT Hat" typing("You now have " + str(game.data.coins) + " coins.\n") game.save() typing("Good choice! I❤LT!\n") typing("Please press enter to continue.\n") input("> ") if hats == "4": talera_hat_price = 20 if game.data.coins < talera_hat_price: clear() typing("You do not have enough coins to buy this.\n") short = str(talera_hat_price - game.data.coins) typing("You are " + short + " coins short.") time.sleep(2) else: clear() game.data.coins = game.data.coins - talera_hat_price game.data.hat = "Bike Helmet" typing("You now have " + str(game.data.coins) + " coins.\n") game.save() typing("Nothing like a bike helmet to keep you nice and safe!\n") typing("Please press enter to continue.\n") input("> ") elif apparel == "2": clear() print("SHIRTS") print("1) White T-Shirt - 10 coins") print("2) I❤LT T-Shirt - 15 coins") if levels.mountains() == 1 and "DWARVEN CLUB" or "NON-MAGIC DWARVEN CLUB" in game.data.trophies: print("3) I CONQUERED TALERA MOUNTAIN T-shirt - 20 coins") shirts = "" if levels.mountains() == 1 and "DWARVEN CLUB" or "NON-MAGIC DWARVEN CLUB" in game.data.trophies: while shirts not in ["1", "2", "3"]: shirts = input("> ") else: while shirts not in ["1", "2"]: shirts = input("> ") if shirts == "1": white_Tshirt_price = 10 if game.data.coins < white_Tshirt_price: clear() typing("You do not have enough coins to buy this.\n") short = str(white_Tshirt_price - game.data.coins) typing("You are " + short + " coins short.") time.sleep(2) else: clear() game.data.coins = game.data.coins - white_Tshirt_price game.data.shirt = "White T-Shirt" typing("You now have " + str(game.data.coins) + " coins.\n") game.save() typing("This is a nice, clean, white shirt. Don't get it dirty!\n") typing("Please press enter to continue.\n") input("> ") if shirts == "2": talera_shirt_price = 15 if game.data.coins < talera_shirt_price: clear() typing("You do not have enough .coins to buy this.\n") short = str(talera_shirt_price - game.data.coins) typing("You are " + short + " coins short.") time.sleep(2) else: clear() game.data.coins = game.data.coins - talera_shirt_price game.data.shirt = "I❤LT T-Shirt" typing("You now have " + str(game.data.coins) + " coins.\n") game.save() if game.data.hat == "I❤LT Hat": typing("It fits nice with the hat. Now you are a REAL fan!\n") else: typing("You should also try to get the matching hat!\n") typing("Please press enter to continue.\n") input("> ") if shirts == "3": talera_shirt_price = 20 if game.data.coins < talera_shirt_price: clear() typing("You do not have enough coins to buy this.\n") short = str(talera_shirt_price - game.data.coins) typing("You are " + short + " coins short.") time.sleep(2) else: clear() game.data.coins = game.data.coins - talera_shirt_price game.data.shirt = "I CONQUERED TALERA MOUNTAIN T-shirt" typing("You now have " + str(game.data.coins) + " .coins.\n") game.save() typing("This shirt proves that you are a real adventurer!\n") typing("Please press enter to continue.\n") input("> ") elif apparel == "3": clear() print("PANTS") print("1) Blue Jeans - 15 coins") print("2) Gym Shorts - 15 coins") pair_of_pants = "" while pair_of_pants not in ["1", "2"]: pair_of_pants = input("> ") if pair_of_pants == "1": blue_jeans_price = 15 if game.data.coins < blue_jeans_price: clear() typing("You do not have enough coins to buy this.\n") short = str(blue_jeans_price - game.data.coins) typing("You are " + short + " coins short.") time.sleep(2) else: clear() game.data.coins = game.data.coins - blue_jeans_price game.data.pants = "Blue Jeans" typing("You now have " + str(game.data.coins) + " coins.\n") game.save() typing("Yay! Classic blue jeans!\n") typing("Please press enter to continue.\n") input("> ") elif pair_of_pants == "2": gym_shorts_price = 15 if game.data.coins < gym_shorts_price: clear() typing("You do not have enough coins to buy this.\n") short = str(gym_shorts_price - game.data.coins) typing("You are " + short + " coins short.") time.sleep(2) else: clear() game.data.coins = game.data.coins - gym_shorts_price game.data.pants = "Gym Shorts" typing("You now have " + str(game.data.coins) + " coins.\n") game.save() typing("Gym Shorts. I guess you are ready to work out!\n") typing("Please press enter to continue.\n") input("> ") elif apparel == "4": clear() print("SHOES") print("1) Off-brand Ripoff Sneakers - 6 coins") print("2) Hiking Boots - 10 coins") shoes_choose = "" while shoes_choose not in ["1", "2"]: shoes_choose = input("> ") if shoes_choose == "1": ripoff_sneakers_price = 6 if game.data.coins < ripoff_sneakers_price: clear() typing("You do not have enough coins to buy this.\n") short = str(ripoff_sneakers_price - game.data.coins) typing("You are " + short + " coins short.") time.sleep(2) else: clear() game.data.coins = game.data.coins - ripoff_sneakers_price game.data.shoes = "Off-brand Ripoff Sneakers" typing("You now have " + str(game.data.coins) + " coins.\n") game.save() typing("Oh, nice! You got some cool sneakers! Hmm... something seems different...\n") typing("Please press enter to continue.\n") input("> ") elif shoes_choose == "2": hiking_boots_price = 10 if game.data.coins < hiking_boots_price: clear() typing("You do not have enough coins to buy this.\n") short = str(hiking_boots_price - game.data.coins) typing("You are " + short + " coins short.") time.sleep(2) else: clear() game.data.coins = game.data.coins - hiking_boots_price game.data.shoes = "Hiking Boots" typing("You now have " + str(game.data.coins) + " coins.\n") game.save() typing("Oh, cool! Now you are a dedicated hiker!\n") typing("Please press enter to continue.\n") input("> ") elif apparel == "5": clear() print("OUTERWEAR") print("1) Winter Coat - 20 coins") print("2) Necktie - 10 coins") print("3) Bow Tie - 10 coins") outerwear_choose = "" while outerwear_choose not in ["1", "2", "3"]: outerwear_choose = input("> ") if outerwear_choose == "1": winter_coat_price = 20 if game.data.coins < winter_coat_price: clear() typing("You do not have enough coins to buy this.\n") short = str(winter_coat_price - game.data.coins) typing("You are " + short + " coins short.") time.sleep(2) else: clear() game.data.coins = game.data.coins - winter_coat_price game.data.outerwear = "Winter Coat" typing("You now have " + str(game.data.coins) + " coins.\n") game.save() typing("A nice coat to keep you warm through the cold winter days.\n") typing("Please press enter to continue.\n") input("> ") elif outerwear_choose == "3": necktie_price = 10 if game.data.coins < necktie_price: clear() typing("You do not have enough coins to buy this.\n") short = str(necktie_price - game.data.coins) typing("You are " + short + " coins short.") time.sleep(2) else: clear() game.data.coins = game.data.coins - necktie_price game.data.outerwear = "Necktie" typing("You now have " + str(game.data.coins) + " coins.\n") game.save() typing("Pretty formal, eh?\n") typing("Please press enter to continue.\n") input("> ") elif outerwear_choose == "3": bowtie_price = 10 if game.data.coins < bowtie_price: clear() typing("You do not have enough coins to buy this.\n") short = str(bowtie_price - game.data.coins) typing("You are " + short + " coins short.") time.sleep(2) else: clear() game.data.coins = game.data.coins - bowtie_price game.data.outerwear = "Bowtie" typing("You now have " + str(game.data.coins) + " coins.\n") game.save() typing("Nice!\n") typing("Please press enter to continue.\n") input("> ") elif apparel == "6": clear() print("ITEMS") print("1) Trusty Backpack - 12 coins") print("2) Hiking Stick - 10 coins") items = "" while items not in ["1", "2"]: items = input("> ") if items == "1": trusty_backpack_price = 12 if game.data.coins < trusty_backpack_price: clear() typing("You do not have enough coins to buy this.\n") short = str(trusty_backpack_price - game.data.coins) typing("You are " + short + " coins short.") time.sleep(2) else: clear() game.data.coins = game.data.coins - trusty_backpack_price game.data.item = "Trusty Backpack" typing("You now have " + str(game.data.coins) + " coins.\n") game.save() typing("Just like it says in the name, it is VERY trusty!\n") typing("Please press enter to continue.\n") input("> ") if items == "2": hiking_stick_price = 10 if game.data.coins < hiking_stick_price: clear() typing("You do not have enough coins to buy this.\n") short = str(hiking_stick_price - game.data.coins) typing("You are " + short + " coins short.") time.sleep(2) else: clear() game.data.coins = game.data.coins - hiking_stick_price game.data.item = "Hiking Stick" typing("You now have " + str(game.data.coins) + " coins.\n") game.save() typing("A nice looking stick to support you while hiking.\n") typing("Please press enter to continue.\n") input("> ") elif apparel == "7": clear() typing("You have exited the shop.\n") elif city_options == "3": clear() print("Welcome to THE DOCKS!") print("At the docks, you can go fishing for some loot, or trade in your fish ") print("You have " + str(game.data.coins) + " coins.") print("1) Go Fishing - 1 coin") print("2) Go to the Fishmonger") docks_options = "" while docks_options not in ["1", "2"]: docks_options = input("> ") if docks_options == "1": if game.data.coins < 1: clear() typing("You do not have enough coins to buy this.\n") time.sleep(2) else: clear() game.data.coins = game.data.coins - 1 functions.textloading(1, "FISHING") fish_options = ["Talera Ruby", "Rustic Coin", "Rustic Coin", "Rustic Coin", "Rustic Coin", "Rustic Coin", "Treasure Chest", "Treasure Chest", "Treasure Chest", "Old Boot", "Old Boot", "Old Boot", "Old Boot", "Old Boot", "Old Boot", "Old Boot", "Old Boot", "Old Boot", "Old Boot", "Wet Sock", "Wet Sock", "Wet Sock", "Wet Sock", "Wet Sock", "Wet Sock", "Wet Sock", "Someone's Underwear", "Someone's Underwear", "Someone's Underwear", "Someone's Underwear", "Someone's Underwear", "Someone's Underwear", "Another Fishing Rod", "Another Fishing Rod", "Another Fishing Rod", "Another Fishing Rod", "Another Fishing Rod", "Shark", "Shark", "Shark", "Shark", "Salmon", "Salmon", "Salmon", "Salmon", "Salmon", "Salmon", "Salmon", "Salmon", "Salmon", "Salmon", "Cod", "Cod", "Cod", "Cod", "Cod", "Cod", "Cod", "Cod", "Cod", "Cod", "Clownfish", "Clownfish", "Clownfish", "Clownfish", "Clownfish", "Clownfish", "Clownfish", "Clownfish", "Clownfish", "Clownfish", "Tuna", "Tuna", "Tuna", "Tuna", "Tuna", "Tuna", "Tuna", "Tuna", "Tuna", "Tuna"] random_item = random.choice(fish_options) if random_item == "Talera Ruby": numbers = ["1", "2", "3"] random_number = random.choice(numbers) if random_number == "3": if "Talera Ruby" not in game.data.trophies: typing("Woah! You got the Talera Ruby! I wonder how it got in the water...\n") else: typing("You got nothing.\n") else: typing("You got nothing.\n") elif random_item == "Rustic Coin": typing("Nice. You got a rustic coin. These are worth 5 coins. Adding 5 coins to your treasury...\n") game.data.coins = game.data.coins + 5 game.save() elif random_item == "Treasure Chest": typing("Cool! You got a treasure chest! I wonder what could be inside?\n") loot = ["20 coins", "3 gems", "A seagull", "An old boot"] random_loot = random.choice(loot) if random_loot == "20 coins": typing("Nice! 20 coins were found in the chest!\n") game.data.coins = game.data.coins + 20 game.save() elif random_loot == "3 gems": typing("Cool! You found 3 gems!\n") game.data.gems = game.data.gems + 3 game.save() elif random_loot == "A seagull": typing("AHHHH!!! A SEAGULL!!!\n") elif random_loot == "An old boot": typing("You found an old boot. Worthless. Just throw it back in the water.\n") elif random_item == "Old Boot": typing("You got an old boot. Worthless. Just throw it back in the water.\n") elif random_item == "Wet Sock": typing("You got a wet sock. Worthless. Just throw it back in the water.\n") elif random_item == "Someone's Underwear": typing("Someone's underwear? Put that back in the water immediately. Hopefully the underwear is empty...\n") elif random_item == "Another Fishing Rod": typing("Hmm... Another fishing rod. How peculiar.\n") elif random_item == "Shark": typing("SHARK!!!!!\n") time.sleep(1) clear() functions.textloading(3, "FIGHTING SHARK") typing("The shark ate 10 of your coins.\n") game.data.coins = game.data.coins - 10 game.save() elif random_item == "Salmon": typing("Nice. You caught yourself some salmon.\n") game.data.salmon = game.data.salmon + 1 game.save() elif random_item == "Cod": typing("Nice. You caught yourself some cod.\n") game.data.cod = game.data.cod + 1 game.save() elif random_item == "Clownfish": typing("Nice. You caught yourself some clownfish.\n") game.data.clownfish = game.data.clownfish + 1 game.save() elif random_item == "Tuna": typing("Nice. You caught yourself some tuna.\n") game.data.tuna = game.data.tuna + 1 game.save() time.sleep(1) if docks_options == "2": clear() print("Welcome to THE FISHMONGER!") print("You have " + str(game.data.salmon) + " salmon.") print("You have " + str(game.data.cod) + " cod.") print("You have " + str(game.data.clownfish) + " clownfish.") print("You have " + str(game.data.tuna) + " tuna.") print("1) Salmon - 2 coins") print("2) Cod - 1 coin") print("3) Clownfish - 2 coins") print("4) Tuna - 1 coin") fishmonger = "" while fishmonger not in ["1", "2", "3", "4"]: fishmonger = input("> ") if fishmonger == "1": clear() typing("How much salmon would you like to sell?\n") salmon_sell = int(input("> ")) salmon_price = 2 if game.data.salmon < salmon_sell: clear() typing("You do not have enough salmon to sell this.\n") else: clear() game.data.coins = game.data.coins + (salmon_sell * salmon_price) typing("You have made " + str(salmon_sell * salmon_price) + " coins!") game.data.salmon = game.data.salmon - salmon_sell game.save() if fishmonger == "2": clear() typing("How much cod would you like to sell?\n") cod_sell = int(input("> ")) cod_price = 1 if game.data.cod < cod_sell: clear() typing("You do not have enough cod to sell this.\n") else: clear() game.data.coins = game.data.coins + (cod_sell * cod_price) typing("You have made " + str(cod_sell * cod_price) + " coins!") game.data.cod = game.data.cod - cod_sell game.save() if fishmonger == "3": clear() typing("How much clownfish would you like to sell?\n") clownfish_sell = int(input("> ")) clownfish_price = 2 if game.data.clownfish < clownfish_sell: clear() typing("You do not have enough clownfish to sell this.\n") else: clear() game.data.coins = game.data.coins + (clownfish_sell * clownfish_price) typing("You have made " + str(clownfish_sell * clownfish_price) + " coins!") game.data.clownfish = game.data.clownfish - clownfish_sell game.save() if fishmonger == "4": clear() typing("How much tuna would you like to sell?\n") tuna_sell = int(input("> ")) tuna_price = 1 if game.data.tuna < tuna_sell: clear() typing("You do not have enough tuna to sell this.\n") else: clear() game.data.coins = game.data.coins + (tuna_sell * tuna_price) typing("You have made " + str(tuna_sell * tuna_price) + " coins!") game.data.tuna = game.data.tuna - tuna_sell game.save() time.sleep(1) elif city_options == "4": clear() typing("Welcome to your trophy room!\n") if game.data.trophies == []: typing("Hmm... Seems like you do not have any trophies. How do you fix this? GO DO SOME QUESTS!!!\n") else: typing("Here are your trophies:\n") for t in game.data.trophies: typing(t + "\n") typing("Please press enter to continue.\n") input("> ") elif city_options == "5": clear() typing("Here is your inventory:\n") print("Hat - " + game.data.hat) print("Shirt - " + game.data.shirt) print("Pants - " + game.data.pants) print("Shoes - " + game.data.shoes) print("Outerwear - " + game.data.outerwear) print("Item - " + game.data.item) typing("Please press enter to continue.\n") input("> ") elif city_options == "6": clear() typing("You have now left the city.\n") time.sleep(2) clear() levels.waiting_room()
def city_teleport(): clear() functions.textloading(3, "Travelling to THE CITY") cityhub()