# Name : Endgame # Purpose : 11DGT # Author: Munroe # Created : 2024 # Copyright : Munroe # Import libraries Import random Import Time # Set starting variables # Staring Health cap_health = 60 thanos_health = 90 # Damage presets thanos_sword = 10 cap_mjolnir = 5 # Deflect Preset deflect = 9 # Player Decision Preset cap_choice = “a“ #Intro print("The sky grows darker as the army of Thanos moves closer.") time.sleep(2) print("Thor and Tony lie battered and motionless on the ground from the previous encounter.") time.sleep(3) print("It is up to you, Cap, to finish this. The fate of the universe is your weight to bare.") time.sleep(3.5) print("You stand there, hurt. But you have your shield in arm hand and wield Mjolnir in the other.") time.sleep(4) print("You are worthy, but will the power of Thor be enough....") time.sleep(3) print("You are in the ENDGAME now") time.sleep(1) #Intro print("The sky grows darker as the army of Thanos moves closer") time.sleep(2) print("Thor and tony lie battered and motionless on the ground from the pervious encounter") time.sleep(3) print(It is up to you, Cap, ) #Choice D else: print("Thanos attacks you with his double bladed sword...") print("You raise your shield and deflect to deflect the blow...") time.sleep(1) deflect = random.randint(1, 2) if deflect == 1 : thanos_sword = random.randint(1, 20) print("You were to slow in raising your shield and Thanos strikes you with his sword for {} damage".format(thanos_sword)) cap_health = cap_health - thanos_sword if cap_health < 1: break time.sleep(1) else: thanos_sword = random.randint(1, 20) print("Thanos' sword rebounds off Caps vibranium shield and he deals himself {} damage".format(thanos_sword)) thanos_health = thanos_health - thanos_sword time.sleep(1) #Set starting variable valudes------------------------------------------------------------------------------------ #Deflect preset deflect = 0 #Plauer decsision preset cap choice = "-" play again = "Y" #----------------------------------------------------------------------------------------------------------------- #Start of Play Again loop while play_again == "y" #start of game loop while thanos_health > 0 : #End of game loop. Checking health values to determine a winner if cap_health < 1: print() print("Thanos is too strong. He has broke your sheild and cut you down.") print() print("Thanos has fallen") time.sleep(.5) print("you drop yo your knees, exhausted") time.sleep(.5) print("You stare out into a grateful universe") time.sleep(1) print("It is safe...") time.sleep(3) print("..................................................................") time.sleep(5) #---------------------------------------------------------------------------------------------------------------- while True: try: print() player_health = int(input("Select a health amount for {} between 50 and 80... ".fortmat(player_name) if player_health < 50 or player_health > 80 : print() print("Please select an amount between 50 and 80") else: break expect print() print("That is not a number..you may need some additional tutoring frim Mr Stark or Banner")