#------------------------------------------- #name: Endgame #purpose:11DGT #Author: Cooper #Created: 19/2/24 #Copyright:© Cooper 19/2/24 #------------------------------------------- # Inport libraries import random import time #Set starting variables -------------------- # Staring Health cap_health = 50 thanos_health = 100 #Damage presets thanos_sword = 0 cap_mjolnir = 0 #Deflect Presets deflect = 0 #Player Decision preset cap_choice = " " #Intro print("Your hole tean lies battered and motionless on the ground.") time.sleep(1) print("It is up to you, Cap, to finish this. The hole world is depending in you hands. ") time.sleep(1) print("You stand there, hurt. But you have your shield in arm hand and wield Mjolnir in the other.") time.sleep(1) print("Lucky you. You are worthy, but will the power of Thor be enough to stop Thanos....") time.sleep(1) print("You are in the ENDGAME now") time.sleep(3) while thanos_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 u choose") print("[a]ttack with mijolnir") print("or") print("[d]efend with your shield") cap_choice = input("Your choice?...") print() if cap_choice =="a": thanos_sword = random.randint(1,15) print("Thanos attacks you with his double bladed sword and deals {} damage".format(thanos_sword)) cap_health=cap_health - thanos_sword if cap_health <1: break time.sleep(1) cap_mjolnir = random.randint(1,20) print("You attack back with mjolnir in hand dealing {} damage in return".format(cap_mjolnir)) thanos_health = thanos_health- cap_mjolnir time.sleep(1) else: print("Thanos attacks you with his double bladed sword...") print("You raise your shield and deflect to deflect") time.sleep(1) deflect = random.randint(1, 2) if deflect ==1: thanos_sword = random.randint(1,15) print("you were 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(5,20) print("Thanos' sword rebounds off cap vibranium shield and he deal himself {} damage".format(thanos_sword)) thanos_health = thanos_health - thanos_sword time.sleep(1) if cap_health<1: print("Thanos has killed you, L") else: print(" i can do this all day") if thanos_health<1: print("you have killed thanos") else: print("come on cap")