#----------------------------------------------------------------------------- # Name: Endgame # Purpose: 11DGT # Author: Shaun Zeldenrust # Created: 19/2/2024 # Copyright: @ Shaun Zeldenrust 2024 #----------------------------------------------------------------------------- import time import random Cap_Health=50 Thanos_Health=100 playerchoice= "a" or "d" or "p" 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) while Thanos_Health > 0 and Cap_Health > 0 : time.sleep(1) print() print("Current Health") print("Cap has {} HP...".format(Cap_Health)) print("Thanos has {} HP...".format(Thanos_Health)) time.sleep(2) print() print("What do you choose?..") time.sleep(1) print("[a]ttack with Mjolnir") print("or") time.sleep(1) print("[d]efend with your shield") print("or") time.sleep(1) print("[p]Parry") cap_choice = input("Your choice?... ") print() SNAP=random.randint(1,50) if SNAP==50 : print("Thanos snapped his fingers ending you and the whole universe instantly") Cap_Health=0 if Cap_Health <1: break time.sleep(1) if cap_choice == "a" : Thanos_Swordamage=random.randint(1,20) print("Thanos attacks dealing {} damage".format(Thanos_Swordamage)) Cap_Health=Cap_Health-Thanos_Swordamage if Cap_Health < 1: break time.sleep(1) Cap_mjolnirdamage=random.randint(1,20) print("Cap attacks back dealing {} damage in return".format(Cap_mjolnirdamage)) Thanos_Health=Thanos_Health-Cap_mjolnirdamage time.sleep(1) if cap_choice == "d": 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_Swordamage=random.randint(1,20) print("You were to slow to block the hit and Thanos strikes back dealing {} damage".format(Thanos_Swordamage)) Cap_Health=Cap_Health-Thanos_Swordamage if Cap_Health <1 : break time.sleep(1) else: Thanos_Swordamage=random.randint(1,20) print("Thanos' sword rebounds off Caps vibranium shield and he deals himself {} damage".format(Thanos_Swordamage)) Thanos_Health=Thanos_Health-Thanos_Swordamage time.sleep(1) if cap_choice == "p" : Thanos_Swordamage=random.randint(1,20) print("Thanos is about to strike you with his sword about to deal {} damage".format(Thanos_Swordamage)) print() time.sleep(2) print("Quickly,You parried Thanos sword, negating all damage!?!") time.sleep(1) print("Thanos was shocked as his sword jolted back towards him with force") time.sleep(1) parry=1 if parry==1 : Cap_Health=Cap_Health time.sleep(1) if Cap_Health < 1 : print() print("Thanos is too strong. He has broken your shield and cut you down. This is the end of all life in our universe...") else: print() print("Thanos has fallen!") time.sleep(.5) print("You drop to 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(" ..For now...") time.sleep(5)