#-------------------------------------------------------------------------- # Name : Endgame Part 1 # Purpose : 11DGT # Author: Shreshth Tyagi # Created : 17/2/25 # Copyright : © Shreshth Tyagi 17/02/25 #-------------------------------------------------------------------------- # import libraries import random import time # Set starting variables #Starting Health (CONSTANT) START_UP_THANOS = 100 #Player health levels cap_health = 0 thanos_health = 0 #Damage presents thanos_sword = 0 cap_mjolnir = 0 #Deflect present deflect = 0 #Player decision preset cap_choice = " " play_again = "y" end = "n" #------------------------------------------------------------------------------ #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) #Reset health levels for characters cap_health = START_HP_CAP # type: ignore thanos_health = START_UP_THANOS while True: player_name = input("What is your superhero name?") if player_name.isalpha() == True: break else: print("Please enter a string input. J.AR.V.I.S error ") while True: try: print() player_health = int(input("Select a health amount for {} between 50 and 80... ".format(player_name))) if player_health < 50 or player_health > 80 : print() print("Please select an amount between 50 and 80") else: break except: print() print("That is not a number.. you may need some additional tutoring from Mr Stark or Banner")